That did used to be the case up until a couple of years ago.
Spain's requirements for residency is a single income of 23000 euros a year plus 7000 more for joint. Or go for the 'Golden Visa', non working and a property purchase of upwards of 5000,000e. Then of course, if not of retirement...