Inevitably, the swings of Spain’s economy has meant that one buyer’s misery became another’s opportunity. At the peak of the housing crisis, some younger buyers moved in, lured by the affordability of a brand-new home they could buy from banks that had repossessed more than half the apartments in Valdeluz.

Javier Guzmán Jiménez , the president of the local branch of the conservative Popular Party, bought his home in 2010. He recalled that he was the last person to buy a house from Reyal Urbis, the real estate company that started the Valdeluz project and eventually filed for bankruptcy. Reyal Urbis was liquidated in 2017, having amassed a debt of more than 3.5 billion euros, or about $4 billion.

In 2010, Mr. Guzmán Jiménez paid €270,000 for his home, in a block where residents share a swimming pool, a playground and a paddle tennis court, a popular sport in Spain. His next-door neighbor waited one more year and got a better deal: €200,000. A neighbor who bought early, before Spain’s construction bubble burst, paid €470,000 for an identical house .