The Spanish city’s woes mirror a broader affordable-housing crunch spreading rapidly across Europe and driving inequality.