Standard and Poor's downgraded Spain's credit rating from AA+ to AA yesterday. Less than a day earlier, the IMF grudgingly agreed to more than double the size of its aid package to Greece from $45 million to $120 million. The EU's poorer states declined to contribute to Greece's rescue package leaving the IMF and Germany to cover most of the costs. The problem is: if investors lose confidence in Spain's ability to pay its debts, then its going to collapse in the same way Greece did, but there will almost certainly be no bail out for Spain since its economy is four times the size of Greece's.
What is most disturbing about this development is that Spain was actually an ideal member of the EU, keeping its debts low (in 2007 it had a lower debt to GDP ratio than Germany) and running a budget surplus. Spain's problem was that its economy became too intertwined with the housing bubble. It was receiving huge inflows of capital from the rest of the EU to invest in its housing sector (everyone loves Spanish villas), which pushed up its gdp, but also wages and prices. When the bubble collapsed, output from the housing sector fell with it, but wages remained high (wages are generally not adjustable downward), so output from other sectors was inhibited by these higher labor costs which then resulted in higher unemployement. This then led to decreased consumption (unemployed people don't buy that much) which further reduced output, and obliged the government to enact large social insurance outlays despite the huge hit to its tax revenue.
If the European labor market was more efficient (language barriers tend to prevent workers from moving around very much), then wages would not have risen so much and prices would have remained in check. Right now, if Spain had its own currency then it could devalue it to make its exports more competitive, stimulate its economy, compensate for the lost demand, and bring its internal prices back in line with the rest of Europe. But Spain doesn't have its own currency. It is stuck with the euro, and there is no monetary levers for it to pull. Rather than a quick devaluation, it is going to have to grind through a slow deflationary process as its internal prices gradually adjust.
The larger issue is whether or not other EU member states will see Spain's crisis as a signal of the EU's viability. In good times, European integration has been beneficial to all of its member states, but as the situation in Spain has shown, the integration is neither deep enough to ameliorate the negative effects of powerful macroeconomic shocks nor relaxed enough to let the member states solve their problems by themselves. Europe is stuck in an uncomfortable middle ground between full integration and independence. The only way to prevent future problems is either further integration (which is unlikely; there will not be a United States of Europe in our lifetimes), or the slow process of dissolution. If Spain collapses and the rest of the EU isn't there to lend a hand, then the EU's days are definitely numbered.