FGT Young people like to go where the jobs are - and in large areas of rural Spain, as in France, there are large areas of poor quality agricultural land, with little or no industry and if young people do not migrate to the cities, they are condemend to unemployment or very poorly paid work.
Yes, Spain lets lots of immigrants into the country but they then live in the country and work there and live there all the time. Some British people do live in the remote areas, but most have holiday homes on or near the coast or in big towns - and growing affluence means that many more people have holiday homes. Of course it is not just the British, many second home owners come from other European countries, especially EU countries. Nor do British home owners just own expensive properties. They buy flats and small villas, much the same as local people want to live in.
It is not a lot different to the problems that arise in south west England. Wealthy people coming into the area to buy holiday cottages, and retirement homes, the homes they want are the homes that were previously the first homes for locals and they price locals out of the market.