Spain pulls a Portugal in the Peninsular War

Is it possible for Spain to pull a Portugal in the Peninsular War and evacuate its royal family to Spanish America?

What could be the long-term repercussions? Could the Spanish Empire become the Mexican Empire or Peruvian Empire?
 
Is it possible for Spain to pull a Portugal in the Peninsular War and evacuate its royal family to Spanish America?

What could be the long-term repercussions? Could the Spanish Empire become the Mexican Empire or Peruvian Empire?

Well, given that the OTL event that as much as anything else triggered the war was the arrest of the Spanish royal family after they'd travelled to France to attend a conference arranged by Napoleon, it's unlikely. You really need a different trigger.

That said, it'd be a lot harder - don't forget the Portuguese capital was a port whereas Madrid is a long way unland. Evacuating the Portuguese royals is simply a matter of putting them on a ship whereas the Spanish royals would have to make a cross country journey of hundreds of miles pursued by the French before they can reach safety.
 
Top