@JCVocke: switching the Austrian and Spanish branches has been discussed here before, but probably isn't that easy. First of all the Spanish inheritance as a whole was more valuable, especially since kingdoms like Hungary (-Croatia) and Bohemia only were inherited at a later point by Ferdinand of Habsburg, because he had married the heiress of these kingdoms.
IOTL Ferdinand of Aragon toyed with the idea of making Ferdinand of Habsburg his heir. Alternatively the Spanish Estates could force Charles to make his brother Ferdinand, who was raised in Spain, his heir there. In such a scenario Charles would definitely have kept the rest (Austria-Burgundy) of the inheritance for his branch and any potential later addition, like the duchy of Milan, would stay with the branch of Charles. However this will also affect the 'marriage game', now Anne of Bohemia & Hungary would be a much more attractive marriage candidate for Charles, especially since ITTL he is the one fully focusing on the empire.
Also though caused by dynastic randomness the house of Habsburg was the legitimate heir to Castille-Aragon and Hungary-Bohemia. Charles as the eldest son and grandson inherited Castille and Aragon; IOTL Ferdinand was elected in Bohemia & Hungary, because of was married to, Anne of Bohemia and Hungary, the sister of Louis II. In other words Ferdinand had the strongest claim 'in right of his wife', but also because the houses of Jagiellon (another branch ruled in Poland-Lithuania) and Habsburg had agreed on a treaty, which allowed the possible inheritance of Hungary & Bohemia, at that point ruled by a Jagiellon, by a member of the house of Habsburg. When Vladislaus II of Hungary and Bohemia got a son (later Louis II) and a duaghter (Anna), the treaty was renewed, but now with a Jagiellon (Hungarian-Bohemian branch) and Habsburg double marriage.
Ferdinand of Habsburg receiving the Austrian Hereditary Lands was also done to further his candidacy, since that would be an additional power base, desired by the Hungarian and Bohemian Estates, for the struggle against the Ottoman threat.