I totally agree with you, Frank. I share the same view. There are always these two sides to the what to wear dilemma: either "when In Rome do as Romans do" or "be yourself". I actually believe it's a mixture of the two, but mostly the first one, for convenience if anything: if I "am totally myself" and wear what I want without any regard for what locals wear, in certain instances I might (1) alienate (or worst, even offend) locals, (2) stand-out "too much" for my likeness -I hate being the focus of anything!, (3) announce "I'm a tourist" in capital letters to would-be petty criminals, (4) be excluded from entering some premises (from churches to restaurants to other private buildings/venues) if I'm found not to be "in accordance with local practices", whatever they might be... and they're of course in their right to do so, after all, I'm a guest at someone else's. So at the end of the day, it's more practical "do as Romans do", isn't it? :)))
As per the specific question from @ampshetler, I would say "it depends"... she's mentioning Sevilla -I'm not familiar with the mores there- but, in general terms, cities have different "habits" than smaller towns and villages. Also, interior cities are different from coastal ones. And finally, in the specific case of Spain, the different cultures existing here also have quite different approaches to this matter, something that might be appropriate say in Barcelona (which is quite smart casual) might not be so in say Madrid (which is more uptight in this matter). Also, note that one's own personal culture is also a factor... it's wrong to think that everybody you see in a city is local; they might be residents indeed, but not necessarily from the same culture -not even the same nationality- as an example, Barcelona has over 20% of its population from nearly 120 different nationalities. For this same reason, thinking "you'll stand out as a tourist anyway" it's not necessarily so... you'll stand out if you dress too differently, or if you walk with an unfolded map looking astonished.... ;)
For most major cities I would recommend a middle approach... long trousers if possible (cotton is very fresh) vs shorts, especially for men. Capris for women are ideal since they're probably fresher than proper trousers but not as revealing as shorts, or short shorts! -which might not be appropriate in certain places/venues. But again, it'll all depend on where do you plan to go... if it's only strolling, a museum here and there and a lunch at any regular restaurant you should wear whatever you like and won't have any problem anywhere.
Finally... in respect of my hometown, Barcelona, for info: swimsuits, bikinis and naked torsos are only allowed on the beach and adjacent streets... anywhere else in the city you can be stopped by the Police and fined... that's City Regulations. Incidentally, on the beach, topless is common practice (no specific areas for that) and we even have some beaches where nudism is also practised. Same goes with many beaches along the Catalan coast. We Catalans are very casual and open about this.
PS: sorry guys, I know in the US you use the word "pants", but although I've lived there too, I've spent more time in the UK.... and pants, in the UK, is something you don't go showing to everybody, LOL!