It is a bit of a stretch (and maybe more than a bit), but:
- Juan Carlos count of Montizon, the Carlist pretender to the throne, manages to make good his claim and becomes king of Spain in 1868. Surprisingly enough, he even manages to hold to the throne and ends up being accepted as the king of Spain by his subjects.
- Notwithstanding this internal solution of the Spanish succession crisis, France and Prussia go to war in 1870 as per schedule. The war goes even worse for the French, for whatever reason (which may or may not include an Italian intervention on the side of Prussia). The outcome is that it takes more effort to repress the communard insurrection, and more division is create among the French. This emboldens the monarchist party, and Henri de Chambord avoids the bouts of stupidity that ruined his chances IOTL. A compromise is found on the flag, and possibly the Orleanist pretender to the thorne is accepted by Henri as his successor (however if this happens, Henri and Philippe d'Orleans will find some way to fight each other in the next few years, with the result that Philippe is removed from the succession).
- Now the former count of Montizon and present king of Spain is again the prospective successor to the throne of France.
- By the grace of God and a number of minor miracles Henri stays on the throne of France until his death in 1883, notwithstanding being a reactionary dinosaur (and Juan in Spain manages to do the same, being just slightly less of a dinosaur).
- Upon the death of Henri, Juan makes good his claim, is accepted by the National Assembly and takes the french throne as Jean (and the other European powers do not object to this nor the French raise in revolution at having a Spanish king on the throne: suspension of disbelief is the key)
- The thrones of France and Spain are now in personal union, at least until the death of Juan/Jean which is just a few years away. Afterwards, the thrones may be split again, with the sons of Juan taking a crown each. Or maybe not and the dual monarchy of France and Spain lasts for decades and decades.
Anyway, the OP is achieved: France and Spain are under a single king in 1883.