First of, Spain and Portugal joined in 1986.
I agree that Spain wouldn't realistically leave. In the 90s and 2000s, Spain has too much to gain from EU Membership and nothing to lose. Freedom of movement, massive infrastructure investments, support for the agricultural sector. Then, Euro-Membership allows for low inflation and low interest rates.
With the burst of Spain's housing bubble and the European debt crisis, however, more than three decades of prosperity stopped. Spain also seems to find it harder to recover than Portugal. The crisis also now highlights the problem that Spain can't devalue its currency any more. Its economy is now forced to work with a currency whose value is a compromise with the more competitive economies (who, like Germany, now work at an advantage). So for Spain's EU Membership continuing to be a success, these issues need to be adressed and at least ameliorated.