Spot on. I would extend your analysis to include the median middle-class person is probably better off in Spain vs most/all US states. This, even though the Spaniard personally earns less income. Largely as a result of the economically precarious nature of living in the US.
Healthcare, childcare, education, retirement are all big expensive things the US does incredibly poorly.