Mostly the EU. Almost every other reason is at best rationalization in comparison. The same goes for Poland. though people from those countries don't necessarily like to admit that the reason they are richer than their peers (in this case, Argentina) is mostly due to geographical luck.
But Argentina also has a peculiar, almost hard to believe tendency to shoot itself in the foot economically
> Simon Kuznets, the winner of the 1971 Nobel Prize in Economics, famously stated there were four types of economies in the world: developed, undeveloped, Japan and Argentina
Spain benefits from being part of EU, Argentina does not have a "support system" like that and sanctified practice of bankruptcy. In the long run, Argentina will beat Spain but that requires them getting their shit together, which is a big if.
But Argentina also has a peculiar, almost hard to believe tendency to shoot itself in the foot economically