It sounds like both Spain and the US have tax systems that cause it to be expensive to sell a house and buy a less expensive house.
In the US, this takes the form of a nonsensical capital gains tax system: personal residences are not eligible for 1031 exchanges, so taxes on gains are due immediately, those taxes are not indexed to inflation, the exemption is too small to make much difference in any high-property-value area, and the basis step-up at death strongly incentivizes children to encourage their parents to keep their house until they die. California puts icing on the cake with Prop 13, so you can trade for a cheaper house and your property taxes increase. At least some recent changes in CA take baby steps toward improving this.
In the US, this takes the form of a nonsensical capital gains tax system: personal residences are not eligible for 1031 exchanges, so taxes on gains are due immediately, those taxes are not indexed to inflation, the exemption is too small to make much difference in any high-property-value area, and the basis step-up at death strongly incentivizes children to encourage their parents to keep their house until they die. California puts icing on the cake with Prop 13, so you can trade for a cheaper house and your property taxes increase. At least some recent changes in CA take baby steps toward improving this.