As title says, reverse of OTL situation happens: Philip the fair, son of HRE Maximilian I dies in October 1497, few months later his wife Joanna of Castile gives birth to stillborn daughter, meanwhile Joanna's brother John, Prince of Asturias, lives untill September 1506 and has 6 surviving children with his wife Margaret of Austria-2 sons (Ferdinand and John Jr) and 4 daughters (Isabella, Mary, Margaret, Joanna). Birthdays are roughly like the ones of OTL Joanna's and Philip's kids. So what would happen then?
Maximilian lost his only legitimate son, so he needs to remarry to save his line, he would seek for annulment of his marriage with Bianca Sforza (and being Holy Roman Emperor, should achieve his goal). Margaret is heiress of Burgundian Inheritance, thus Netherlands should go to Trastamaras (would Margaret & John move to Netherlands to rule personally? Tere is no need for them to remain in Spain as long as John's parents are alive). Joanna likely ends married to Manuel of Portugal. If Catherine is still send to England and Arthur dies like IOTL, her sitation after being widowed should improve compared to OTL (not only death of Queen Isabella could be delayed with her beloved son living longer, there is also no alternative of Eleanor of Austria as candidate for future Henry VIII's wifd to distract Tudor's attention and no Philip in Burgundy to advocate for such solution (and no Philip's spies among members of Catherine's court in England).
Habsburgs, if they would even survive in male line, are going to be weaker than IOTL without Spain and Netherlands (BTW whom would Max marry to save his bloodline? Joanna is rather impossible. Agewise Joanna's sister Maria, and Elisabeth of Poland are good candidates, followed by Elisabeth of Denmark). What would be more important for Max? Strenghtening ties with Spain or strenghtening his claims to Bohemian and Hungarian thrones?