Spain was losing influence in America for the previous 100 years, and there was a recent Spanish-American war. So how could have Spain remained neutral?
Why could Spain not find a place in the Central Powers?
Complimentary to Tom's answer, you have to ask yourself which side they'd come in on. There's nothing really useful in terms of territory they could get out of Germany or Austria-Hungary, since both were way on the other side of Europe.
If they'd gone in on the other side, they could perhaps have gotten useful territory from France. However, French forces were generally considered much higher quality than Spanish, and the Pyraneese mountains would prove a very tough defensive line to crack. To make matters worse, they would have quickly found themselves with a two-front war, as Portugal was a long-standing British ally, and would certianly have gotten involved if England did (as had happened 100 years earlier at the start of the Peninsular War.
The biggest reason for Spanish neutrality I believe was their unique experience in the Peninsular War. This was the last time that Spain had allied itself with a major power, and that major power used the alliance to stab Spain in the back. The ensuing war was bloody, and almost entirely carried out on Spanish soil with Spanish blood. We get the term Guerilla Warfare from this conflict. When the smoke cleared, the winners and losers went home and tabulated their gains or losses, but Spain was in ruins economically, socially, and emotionally. So you can see where the Spanish would be a bit less inclined to join an alliance on a whim.
Lastly, the country was still getting over their humilation in the Spanish American war (known as "The Disaster" in Spain) a decade and a half earlier. Their government at the time was kind of a weird attempt to ape the form of the British Constitutional Monarchy, but without any real Democracy. Unsurprisingly, it had every bit as much real popular support as the people had real voices in it (iow: almost none). I suspect it was pretty clear to everyone it wasn't stable enough to engage in a foriegn war, and in fact it fell on its own about a decade after the end of WWI.
There were two power blocs, the Triple Alliance (Germany, Austria-Hungary, Italy), and the Triple Entente (Britain, France, Russia). Spain was part of neither and had no reason to support one or the other.(Italy later switched sides).
Spain was fortunate to be outside of the main battle areas: France, Belgium, Poland, the Balkans, western Russia. It had no reason to fight.
The U.S. was neutral until 1917, so Spain had no reason to side with the Central Powers on that basis. Nor did she have other common interests with them.