I appreciate this may be an 'ask geneticists' question (if there is such a thing), but many accounts of the Spanish Habsburg line confidently assert that their frequent intermarriage with the Austrian branch was the probable cause of the genetic issues which culminated in the early death of Charles II of Spain and the end of the Spanish Habsburgs. My question is, why were the consequences of this only one directional? I believe the Austrian Habsburgs intermarried quite frequently too, yet apart from possessing the 'Habsburg jaw' the consequences of this consanguinity seem far less stark. Are they merely given less attention, or is there indeed a disparity of outcomes? If the latter, does that throw into question the accuracy of the prevalent Spanish narrative?
This may be more of a genetics answer but...
Inbreeding is measured using something called the kinship coefficient, which is the probability that a randomly selected allele from one individual is from the same ancestor as a randomly selected allele from another individual. The more shared ancestors two individuals have, the higher their kinship coefficient. This can also be translated into the inbreeding coefficient, which is the kinship coefficient of an individual's parents. So if your parents were first cousins, their kinship coefficient (F) would be 0.0625, which would also be your inbreeding coefficient.
I'm going to defer to actual geneticists for a full discussion on the effects of inbreeding in humans, but for our purposes the important thing to know is that higher inbreeding coefficients are associated with a greater likelihood of inheriting recessive traits, shorter life expectancy, and higher infant mortality rates. There's no threshold of tolerable inbreeding, but in general you start to see some negative effects when F > 0.05 and reduced survival and fertility when F > 0.10. Ceballos and Alvarez (2013) calculate the kinship coefficient for the marriages of the Holy Roman Emperors, Spanish Habsburgs, their children, and grandchildren over a period of 300 years (1450-1750). They find that the mean kinship coefficient across 73 marriages was F=0.068, just above that of two first cousins. There is significant variation, from those who are only distant relations to couples that are related several times over.
Looking specifically at the emperors and kings, Ceballos and Alvarez show find that the average inbreeding coefficient for a Holy Roman Emperor was F=0.075, compared to F=0.129 for the Spanish kings. Unsurprisingly, Charles II of Spain is the monarch with the highest inbreeding coefficient of F=0.254, which means genetically his parents were the equivalent of two siblings, or a parent-child relationship. In reality, his mother was his father's niece, but there were so many prior relationships in that family tree that they are genetically equivalent to siblings. Charles II's grandfather, Philip III was the monarch with the second highest inbreeding coefficient at F=0.218. Compare this to the Austrian line, where the emperors with the highest inbreeding coefficients were Leopold I (F=0.157) and Ferdinand II (F=0.139).
There's a couple reasons the Austrians are somewhat less inbred, despite the practice of marrying relations being common in both branches. First, the Austrian branch starts with more genetic diversity. When Charles V divides the Holy Roman Empire into Spanish and Austrian branches, he gives the Spanish side to his son, Philip II, and the Austrian side to his brother, Ferdinand I. Charles V and Ferdinand I both have low inbreeding coefficients (F=0.037) as their parents Philip and Joana of Castille aren't closely related. Ferdinand I marries Anne of Hungary, with whom he only shares one common ancestor in the preceding four generations (John II of Aragon). Meanwhile Charles marries his already pretty inbred first cousin, Isabella of Portugal (0.101), which gives their son Philip II an inbreeding coefficient of 0.123. Philip II marries four times and has six sons, only two of whom live past the age of ten. It's his sixth son, the product of his fourth marriage to his niece Anne of Austria (0.106), who succeeds him on the throne as Philip III (0.218).
Second, while several of the Austrian Habsburgs married their first cousin, two of the Spanish Habsburg kings (Philip II and Philip IV) marry their nieces and pass the throne to the resulting offspring. An uncle and niece have twice as much shared genetic material as two cousins. This is why Charles II has a particularly high inbreeding coefficient - about equal to what it would be if his parents were siblings. He is the product of close inbreeding over multiple generations. It should be noted that while inbreeding certainly can explain his health issues, a clear causal link can't be established absent genetic testing. However, there are several recessive genetic disorders that can explain his various conditions and would be significantly more likely in someone with his genealogy. There is evidence that the extinction of the Spanish Habsburg line as a whole is the result of inbreeding, due to not only Charles II's health issues, but abnormally high infant mortality rates that increase with the kinship of their parents (Alvarez et al., 2009).
This isn't to say there wasn't also significant inbreeding on the Austrian side. Maximilian II, Ferdinand II, and Ferdinand III all marry their first cousins, which gives us Leopold I with an inbreeding coefficient of F=0.157. He then marries Margaret Theresa of Spain, with whom he has a kinship coefficient of F=0.305. Margaret Theresa was Charles II's sister, so she didn't have a lot of genetic diversity in her family tree to begin with (F=0.254), and then she married a man who was both her uncle and first cousin. If they had a surviving male heir, he would have been the most inbred Habsburg monarch, but three of their four children died in infancy and she died at 21. Instead, Leopold I's successor was Joseph I, his first son with his third wife, Eleonor of Neuberg, who was almost fresh blood by Habsburg standards as Leopold I's second cousin.
Sources:
Ceballos and Alvarez (2013). "Royal Dynasties as Human Inbreeding Laboratories: the Habsburgs." Heredity. https://www.nature.com/articles/hdy201325#Sec4
Alvarez, Ceballos and Quinteiro (2009). "The Role of Inbreeding in the Extinction of a European Royal Dynasty." PLoS One. https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0005174
Vilas et al (2019). "Is the Habsburg Jaw Related to Inbreeding?" Annals of Human Biology. https://www.tandfonline.com/doi/pdf/10.1080/03014460.2019.1687752