With the caveat that this is not tax advice and I lifted it straight from Wikipedia, it seems that CR7 might have cut himself a sweet deal tax wise. Well this is what Wikipedia says:
On June 10th, 2005 the Spanish government approved Royal Decree 687/2005 implementing the Personal Income Tax regulations in relation to article 9.5 of the Spanish PIT Law. The "Beckham law", as it is commonly known, regulates the procedure to apply for the new Spanish tax regime for expatriates in force since January 1, 2004.
The change of legislation allows an individual who has relocated from another country to Spain the choice of being taxed as a Spanish resident or as a non-Spanish resident. The choice applies in the year of arrival to Spain and continues for the following five years. By electing to be non-resident, one can limit their liabilities to Spanish taxation to Spanish income and assets only and not on a worldwide basis. Thus under Spanish Non-Resident Income Tax rules they may avoid tax on their worldwide income for a period of up to six tax years provided that certain conditions are met.
Should such a choice be made, the expatriate will be subject to Spanish taxes on their Spanish source income and on their assets located or exercisable in Spanish territory, being subject to a flat 25% tax rate on his salary income instead to the progressive tax scale for resident individuals (ranging from 15% up to 45%) during the year of acquisition of the Spanish tax residency and the following 5 consecutive years.
Not bad at all. A 25% tax rate instead of the UK 50% rate and no tax at all on foreign source income. A little like the UK non-dom rules, but without any of the messy "bringing income onshore" rules. Very handy if you have a big deal from foreign sponsors, international image rights, worldwide endorsements etc. Particularly if you have a relatively short career like a footballer.