Spain isn't in a bad situation, if we compare them with Greece, but the weight of Greek economy is 7 times lower than Spanish ( Spain's GDP is $1.6 trillion. Greece's is $357 bn), so a fall of Spain would be harder than the (expected) Greek one
Real estate bubble: Main problem
Housing was (and is) one of the principal income source of Spanish economy. Low interest rates, easy credit environment and a continuous stream of foreign workforce, made possible a big number of new houses (and high skyscrapers) in no time, at Valencian-Catalan coast, mainly used as summer house.
This boom increased real estate price a 80%, from 1990 to 2009, as foreigners used them as summer house, who had a bigger budget than the average Spanish.
Spain's unemployment: An endless nightmare
Foreigners (sometimes, illegal ones) work went to Spain to work at construction, in such numbers that Spanish government was unable to control. In the fourth quarter of 2009, unemployment was 18'8% of total workforce power. Youth unemployment levels are even worse: 43%, being the second worse of Europe and two times the European Union average.
How Spain can deal with labor problems?
Spain can hardly compete with Germany, France, UK, Ireland, and most European countries for the quality of its products and, as long Spain can't devaluate its currency as China with Yuan, can't become more competitive with other countries, offering low-priced products.
Spain, as Italy and other countries, will raise the retirement age from 65 to 67 and cut the government spending (like Greece), as short-term measures to deal with their problems
Future of Spain's economy (if any)
Housing bubble collapse, leaves small room for opportunities to Spanish economy. Spain should work is way to improve his GDP, opening new resources to his income. One may be solar energies, where Spanish government is starting to work it, to replace housing former source.
The big question is: Would Spain solve his GDP problem in time, or would be a second Greece? The European Central Bank can support Spanish debt financing the country? Or will fall?
Greek economy rated junk by S&P Share