John II never abdicates his title; instead, his heir rules the (Zapolyan) Kingdom of Hungary until the 1590s, when a series of bad decisions and bad luck culminate in a Wallachian invasion in which this last Zapolya is deposed and the nobles of the realm elect the Wallachian Prince Michael Viteazul to the throne. Around 1600, Michael improves relations with Poland-Lithuania, allowing him to seize Moldavia.
Thus, as in OTL, Michael rules over a union of Wallachia, Moldavia and Transylvania - but since the Zapolyas never relinquished their title, Transylvania/Partium is de jure the Kingdom of Hungary and Michael's actual title is Prince of Wallachia and Moldavia and King of Hungary. This heavily Romanian-dominated Romanian/Hungarian union would last for at least a decade or so, and with Polish backing, Michael and his heirs might even be able to gain a foothold in actual Hungary and successfully resist both the Ottomans and the Habsburg King of Hungary's inevitable machinations.