Madrid and all surrounding cities (Toledo, etc.) are a big shade of red. Barcelona and in fact the entire densely populated Mediterranean coast (Valencia, etc.) is also lipstick-red. Sure, let's look at the Basque Country. Also red.
The only blue I see is in the mostly rural Extremadura, Leon, etc. (close to Portugal).
So even if pop. decreased, not everyone moved from e.g. Madrid to Germany. Many people moved to smaller cities or rural areas, so if you just see the map without pop densities it looks that way.