As between Spain and Italy it's a tough call, but I would rank as follows:
Large cities (500,000+ city limits): Spain by a large margin.
Madrid/Barcelona/Seville/Valencia > Rome/Milan/Naples/Turin
Midsize cities (200,000 - 500,000): Edge to Italy. Spain has some outstanding cities in this category as well, but this is where Italy really shines and where it has its best cities -- some of the most incredible cities in the world.
Venice/Florence/Bologna/Verona > Bilbao/Granada/Córdoba/Oviedo
Small-ish cities (50,000 - 200,000): too close to call. I would call it a tie or a tiny edge to Spain.
San Sebastián/Cádiz/Salamanca/Toledo/Segovia = Parma/Modena/Bergamo/Perugia/Siena