We've been in June and November before. The heat really is something else.
Everywhere indoors is air conditioned, outside is sometimes unbearable it honestly takes your breath away as you walk outside. But It does depend on what you're doing. We took Dd when she was 2, that was June 2018 and they were having a heat wave. We stayed at The Atlantis both times , it's an amazing hotel.
We'd get up and out to the water park as soon as it opened. Spend a couple of hours there. Go indoors around lunch, have some food. Dd was still napping at that age so she'd have an hour or so in the room. DH and I started to have a nap too 😂 have a look around the aquariums indoors, then we'd go back out again around 3 for a few more hours in the water park.
The water parks are built for the heat so a lot of canopies and shade around the kids area etc.
But you will need factor 50 and lots of it. Probably easier if your kids will wear them to get UV safe surf tops or something as well as sun cream. Hats, always. Plenty of water all day. And pool shoes. The pathways around the water parks are scorching hot, you can obviously buy them in the hotel, but save yourself some money and get them in sports direct.
We love the heat, but if you find Summer in Spain too hot, I can't imagine it being much fun.