This is not the reason. Labor is expensive even in parts of the US with low housing costs.
The real, simple reason is the US has a more prosperous economy where the average worker has more opportunity than their Spanish peers. Just look at unemployment rates. The US is at 4.3% right now compared to Spain's 10%. Even at the peak of the GFC the US barely had over 10% unemployment. In the meanwhile Spain has had over 10% employment almost the entire time the past four decades. Of course labor is cheap when that many people are jobless.