According to the first partition treaty Joseph Ferdinand would have inherited Spain, the Southern 'Spanish' Netherlands, Sardinia and the Colonies.
The dauphin, Louis, would get Sicily, Naples, the State of Presidi, Finale and Guipuzcoa north of the Pyrenees.
The Austrian candidate, archduke Charles, would get the duchy of Milan.
According to the terms of the second Partition treaty, after the death of Joseph Ferdinand, there were other terms.
Archduke Charles inherited Spain, the Southern 'Spanish' Netherlands, Sardinia and the Colonies, but as later IOTL Philip V, he wasn't allowed to unite these lands with the Empire and the lands of the Austrian branch.
The dauphin now got Sicily, Naples, Lorraine & Bar, the State of Presidi, Finale and Guipuzcoa north of the Pyrenees.
The duke of Lorraine & Bar was compensated with Milan.
There were a number of flaws to these treaties, like not all parties were involved, and Charles II was still free to name his heir, which would be able to inherit in Spain proper.
IMHO especially the first partition treaty seems uneven; not to mention the fact that the Sea Powers, the Dutch Republic and England (,Scotland & Ireland) went behind the back of their ally the HRE (Austria), still there seemed to have been some strains within that alliance.
IMHO maybe assigning Austria a bit more, like the Southern Netherlands, might lead to Austrian accept it under protest. That would be fine for the Sea Powers too, as long as the Southern Netherlands wouldn't be French.
At the end Charles II response after the First Partition was quite wise, he gave everything to Joseph Ferdinand. Maybe under this scenario France and Austria might even end allying, if they can agree on how to carve up the Spanish European possessions outside Spain.
If that would happen it would, the reaction of the Sea Powers would be interesting; they didn't want a French Southern Netherlands, but those staying Spanish or becoming Austrian didn't matter much.