If you're a citizen of another EU country, and especially if you're arriving from an EU country, it is highly unlikely that any Spanish immigration official would be interested in your onward or return travel arrangements, unless you look particularly outlandish or suspicious. But if you're from the US, or other country where you need a Spanish visa, then you might be asked about your onward travel arrangements.