Again, as I always point out in my posts regarding similar questions: SPAIN is not "a country" per se in the traditional sense. There's no uniformity as it's composed of different regions with different cultures, some of which have little in common and are at odds so, often, there's no "Spanish" this or that, there are habits, values and ways of doing things in Basque Country, in Catalonia, in Galizia or in the generic "Spain" -which normally refers to Castille but which includes most every other remaining region too.
Saying so because you're not specifying where are you visiting. While, in general, as in most Western countries, dress codes are very 'loose' these days, there are still some instances in which there's a code, even if unspoken one. And it might change substantially depending on which culture you're in.
Thus, for example, Andalucia is a rather conservative area, especially when relating to religious matters (ie. visiting churches and cathedrals) while say, Catalonia, it's rather the opposite, is far more progressive. In fact, in the later, the only place I know you'll be asked to "cover" your shoulders and wear attire "below your knee" would be the Cathedral of Barcelona -and only at certain hours. To my knowledge, all the other religious buildings won't object much to "most attire" -tiny tiny shorts and transparent wear might still be over the top for these places though :)
As per white trousers and women, speaking for my culture here in Catalonia, is rather a Spring/Summer (all the way to early Oct if the weather is nice) thing. White trousers are very uncommon when the weather is already autumny. Still, no one will frown if you're wearing white pants in December either, as said before, this is a progressive society with very few "strict dress codes" -if you catch my drift- so there's a lot of live and let live attitude here.
Same goes for "food"... no "Spanish food", but rather Catalan, Basque, Andalusian, Castillian cuisines. They can be quite different one from the other and, as in most other places, that's due to different climates and also whether they have access to the sea or not.
Having said this, there are, obviously, some culinary specialities that transcend "borders" and can be found most everywhere.
PS @Chani, for reference, in my neck of the woods, white shoes -leather shoes or boots- are considered simply "tacky". But white espadrilles in Summer, for example, would be "en vogue": https://www.glamour.es/moda/tendencias/articulos/espartenas-sandalias-verano-tendencia-2019/44743 or https://lookastic.es/moda-mujer/alpargatas/como-combinar