Spain would have only joined if the war was going very badly for the Entente. Also, I think Italy would have had to have joined the Central powers. They really had nothing to gain from the Central Powers in terms of territory, so I'd assume they'd go after the Entente.
I think you'd require a neutral Portugal (to prevent the British landing there), along with Italy joining Central Powers to have Spain join in. Also, I'd assume that the United States says neutral.
It could me more interesting if Sweden and Romania also throw in their lot with the Central Powers. Sweden wanting control of Finland, Romania of Bessarabia. Italy would go for Tunis, Constantine in Algeria, Corsia, Nice and Savoy.
The Spaniards could want control of all of Morocco, Gibraltar, the department of Oran and possibly Roussillon (as part of Catalonia).