If Elisabeth was barren and both she, her husband and his sons by his first wife all die around the same time as IOTL then Spain would I think theoretically devolve to Louis XV upon the death of Ferdinand VI in 1759. Philip V had no daughters nor surviving brothers or nephews other than Louis XV. Of course I doubt that the rest of Europe would be anymore willing to see France and Spain united as they had been 60 years earlier. Conveniently Louis XV while having only one son has at the time 4 grandsons. So Spain could potentially pass to one of them, perhaps the second eldest the Duc de Berry. But the eldest died in 1761 making Louis Auguste Duc de Berry the next in line after his father the Dauphin. Louis Auguste of course becomes Louis XVI. So perhaps his younger brother the Comte de Provence becomes Luis II of Spain (this would be OTL Louis XVIII). Probably a lot of this gets wrapped up in the Seven Years War, although if Austria does ally with France it might work out smoothly.
In fact Austria may come out far ahead. Because if Elisabeth Farnese has no children then there are no heirs to Parma, at least none that I can find searching through all of the male and female lines going back several generations. Basta for the Farnese. So the Austrians may retain Naples and Sicily and perhaps pick up Parma in exchange for allowing Luis into Spain. So in the final analysis France is much the same, except the ultra royalist Comte d'Artois moves up one spot in the line to the French throne, relevant only if we still have the Revolution. Austria is plainly in a much better position in Italy. Spain sadly is much weaker. Charles III was arguably one of the best Spanish Kings of the 18th century and replacing him with OTL Louis XVIII, initially under some kind of regency no less, is not like to improve the situation.