I'm fairly aware of contemporary understanding of the war now, but what of understanding at the time. Modern understanding, in my reckoning seems like opportunism on Napoleon's greed, but my feelings towards the First French Empire do not make uncurious to its causes and subsequent effects. In a sense what was the feelings towards Spain during the war and its legacy, as I know that French sentiment and much of the world is very different from from Anglican teachings?
Generally speaking, the Peninsular War was unpopular within France, both during and after the Napoleonic Wars. There's a French idiom, batir des châteaux en Espagne (to build castles in Spain), that means to build castles in the air or ice- i.e. a folly. While this idiom preceded Napoleon, the grinding and indecisive nature of the war lent the phrase a new currency. In particular, Napoleon's popularity and prestige were connected with quick decisive victories, which Spain clearly was not. In particular, Spain was not a popular war among the army. For the flag officers, Spain was a place where careers went to pasture (only Suchet came out of Spain well) and the rank and file saw Spain as the opposite of the more "civilized" battlefields of Central Europe. Letters, memoirs, and diaries of Napoleonic soldiers contended that the Spanish were uncivilized and savage brigands.
As for the Spanish contingent, you might be thinking of the La Romana division http://en.wikipedia.org/wiki/Evacuation_of_the_La_Romana_Division
On that point, I understand a Spanish contingent was in Denmark during this war. What became of them?