Quite the range of age for all the family in terms of what each person will find interesting. You are blessed to have 30 days to create a wonderful journey of memories. Keep in mind a journey does not need to have a multitude of different destinations in order to be memorable.
Some thoughts (BTW, we have traveled with our daughters internationally as they grew from pre-teen to present day).................
I will go "pragmatic" before diving into destinations.
Top tip, HYDRATION is vital to enabling enduring the heat. Please start hydrating everyone the day prior to the trip (a long flight is a dry environment which will suck the moisture out of you). If you fly out of SEATAC there are several locations where you can bring a plastic bottle and fill with water after passing through security. Upon arrival keep hydrating daily with healthy doses in the evening and early morning. Do invest in purchasing fruits and icy drinks for consumption while you are out and about.
Wherever you travel, July is high tide for tourists and a combination of heat and lines can take the delight out of the journey. Do take advantage of booking online tickets allowing scheduled arrival times at sites. Doing so is a major time saver and stress reliever. Become a local and adapt to the "siesta" as there is great value to NOT baking in the heat and allowing your feet to rest. AVOID believing your trip expense requires going all out to gain the maximum use of your dollar. Slow down you move too fast, you got to make the moment last. BTW, tennis shoes are great but trap the heat and sweat. We use sandals. Dusk is the beginning of the next day for enjoying your journey. Locals come out to socialize, stroll and kids run about playing. It is tough changing the eating patterns of a family, but we learned to eat lighter meals later enabling the opportunity to partake in more local evening events. Dirty secret, we allow our girls to eat at McDonalds while abroad for the sanity it seemed to provide them and us. Which brings up another subject........... When is the last time your family has spent 24 hours together daily for 30 days without a break? Think it through and discuss how each adult can be okay with "abandoning" the other in order to have some "me time". Sanity is at sake.
Wherever you go we strongly recommend renting an apartment. A kitchen, separate bedrooms, family room and maybe a washing machine justifies the effort. Seeking AC functioning locations is vital, but also a location where the rooms face an interior courtyard is important (sound control from street noise). BTW, Thirty years we abandoned staying in hotels and took to staying in neighborhoods outside of traditional tourist zones. We found cheaper places to eat, more engagement with local events and a less stressful environment. The internet has made finding great locations easier to the point where researching online expat news sites helps find well recommended apartments for let.
Spain offers a wonderful selection of markets to wonder and experience a variety of foods and experiences. Kids love being able to sample the display of tastes available in these markets and we have found vendors are warmly welcoming to kids. Shopping is family situational, but some of the best souvenirs our family purchases is clothing. Once back home wearing a garnet/shoes purchased abroad is a great reminder of the journey. "Where did I get this scarf? At a second hand shop in Barcelona.".
IMPORTANT! Department store https://www.elcorteingles.com has great bathrooms on their top floor and sometimes a grocery store in the basement. How to beat the heat? Window shopping in an AC department store!
Do challenge the whole family to sampling different food experiences. Take the time to purchase food within local meat/fish/produce markets. Encourage the kids to take the lead in selecting foods.
OK, next post will be about destinations.