Countries like Spain, Portugal and Italy and Grecee (those two especially) are for sure more corrupt than the Northern European countries, the UK etc. but Spain is comparable to France on this front IMO.
In the case of Spain it is getting better and it really depends on the region. Franco's legacy has a lot to blame for that and the old generation (mostly the ones in power now) who are the children of that period or the sons and daughters of parents who grew up and lived in that period.
Still a country like Morocco is way worse than all of those above and not even a democracy to begin with.
Spain and Morocco definitely have some similarities but I don't think that the level of corruption is one of them vecino.