From what I know, the British and the French were both planning to Partition the Spanish Empire. Joseph Ferdinand of Bavaria would have received Spain and the Colonies, but the rest (Spanish Netherlands, Milan, Naples, Sicily, Sardinia) would have been split between other possible claimants.
However, I do not know the exact terms are my sources contradict themselves about it... And Wikipedia shows a major flaw: the French version of the Encylcopedia doesn't have the same terms as the English one! Another thing that bugs me is that I saw Tuscany being mentionned and I don't get it: even if they were to die in 1737, there were still Medicis ruling the Grand Duchy by the time of the Partiton Treaty...
From what I understood though, Louis the Grand Dauphin (eldest son of Louis XIV) was supposed to receive Naples & Sicily. Some of my sources say he might also have received Bar & Lorraine from Duke Leopold I in exchange for granting the latter Milan.
Archduke Charles, second son of Holy Roman Emperor Lepold I and later Holy Roman Emperor Charles VI, was to receive something but that remains unclear: it migh either be the Spanish Netherlands or the Duchy of Milan, depending of my sources.
But even with that, the First Partition Treaty wasn't without its flaws: it left the Hapsburg out of it as it was only concluded between Britain and France. The Austrian Hapsburg would have not allowed France to inherit Italian lands as they apparently insisted on Archduke Charles getting all the Italian inheritance OTL during negotiations for the Second Partition Treaty. There is also Charles II of Spain's opinion: he never wished for his Empire to be splitted. Even if he's mad and his opinion doesn't matter much, I believ the last of the Spanish Hapsburg can cause trouble... I thus see three possible scenarios:
1) The First Partition Treaty is applied along its terms.
2) A new Partition Treaty is negotiated between Britain, France and the Austrian Hapsburgs.
3) ATL War of Spanish Succession between those who want a dismembered Spanish Empire (Britain, France) and those who don't.
Whatever the case, we probably end up with a Wittelsbach on the Spanish throne as it would satisfy everyone: the Wittelsbach have connections to both the Bourbons (the wife of the Grand Dauphin was a Wittelsbach) and the Hapsburg (since Joseph Ferdinand is the nephew of Charles II of Spain). The question of a Personnal Union between Bavaria and Spain remains but I'm not sure it would be taken into account: Joseph Ferdinand's father, Elector Maximilian II Emmanuel of Bavaria, remarried and had another son, the Holy Roman Emperor Charles VII (contestant of Maria Theresa & Francis I). Maximilian II of Bavaria could still remarry and father his second son in this scenario : if so, he might choose to have Joseph Ferdinand inherit Spain and his younger son (probably called Charles as OTL) gets Bavaria.