I wouldn't say destroyed two great empires, more like destroyed one, crippled another out of Superpower status (at a time where Superpowers generally don't exist), and helped open the gates that allowed Islam to spread east into the Indian Subcontinent, China and Southeast Asia.
Though not to say for lack of trying, Khosrau II, like many Shahs of the House of Sasan, genuinely wanted to restore the Empire to the borders of their forebears, the Achaemenid Empire, even though had he succeeded their was the likely fact that things was going to end up blowing up come the religious zeal of Islam starts to take root.