Well, there was not many incentives for Spain to enter in the war, nor the internal circumstances (from the social conflicts to the state of the armed forces) invited to military adventures. Meanwhile, there were substantital incentives to keep the neutrality, which benefited greatly the spanish industries snd opened the door to the posibility of exert some international influence as "mediator" amongst the warring sides (at least that was Alfonso XIII's idea).
However, on the event of a spanish intervention in the war, it would be most likely on the side of the Entente, since Spain was already closelly tied to Britain and France due to economical dependencies (a situation that increased during the war) and previous international treaties (mainly the Mediterranean Agreements and the Cartagena Agreement) There was not such links with the Central Powers, though the army was mostly germanophile, and furthermore, with the geographical situation of Spain it wouldn't be only an economical suicide, but also a geostrategical one. Indeed, german diplomacy never expected or seeked more from Spain than extrict neutrallity, due the aforementioned situation. Plus, the german unrestricted submarine warfare
caused notable damages to the spanish merchant navy, with harsh logic diplomatic consequences. And precisely this is the only feasible reason I can think to push Spain into the war, as a reaction to the german attacks over spanish ships if Germany neglects the politic of appeasement towards the spanish protests that she followed in OTL (economical and material compensations)
Cheers.