My understanding is that they did try and stop the real estate bubble (to some extent anyway) but regulating bank loans, but the German banks stepped in to fund riskier projects.
The were some talking about burst the bubble in 2004, but Zapatero's government never implement the reforms. The Spanish prime minister regret later about not bursting the bubble earlier.[2]
Spanish banks are well protected against loans because, the asset pledge as collateral" clause is rarely use in Spain.
[1] http://www.businessweek.com/news/2011-12-08/sabadell-buys-ca... [2] http://www.elmundo.es/elmundo/2011/06/28/suvivienda/13092749... (Spanish)