As you've stated the importance of museums/architecture etc. then the best destination by the sea, in mainland Spain, is the city of Malaga, in Andalusia.
http://en.wikipedia.org/wiki/M%C3%A1laga
Within 21 miles of the city are 3 excellent water parks, Aqualand in Torremolinos (10 miles away) and a little further on Parque Acuatico Mijas (16 miles). In the opposite direction, and 21 miles away, is Aquavelis, in Torre del Mar.
http://www.aqualand.es/torremolinos/en/
http://www.aquamijas.com/en/#!/
http://www.aquavelis.es/index_en.htm
They are not in Spain, but Barcelona or Tarragona in Catalunya have lots of them ! They are both gorgeous, costal towns and cities, they have amazing history - Barcelona is filled with Catalan history, and Tarragona has lots of history from when the Romans were there, and both are cheap to visit. Every town has a market that comes to it for a few hours on a specific time and day of the week. And as for waterparks, I am pretty sure both cities have them, but you may need to research ! I would recommend researching the place you pick regardless of where in the world beffore you go so that you know exactly what there is :)
You can try cities around the coast in Catalonia. For example, Lloret de Mar has beaches, museums, ant it has a well know water park: Waterworld. It's in the province of Girona and very easy to reach from Barcelona (like 1 hour by car.)
I was going to answer this but Mr. Pompal has said it all and his is correct, here on the costa del sol if you can't find the water parks, beaches, entertainment of any kind you have landed at the wrong airport...........................have a nice holiday !
Lots
The two I've been to are Benidorm and Salou
As a base - Barcelona
Benidorm got the lot.
Do you know of anywhere in Spain that's by the beach/sea, has a waterpark nearby but also something like museums/markets/architecture or something like that?