Heat rash can be annoying because it's not always about direct sun exposure. Sometimes, it is usually caused by sweat getting trapped in the skin, especially in hot, humid weather that we're facing. Even when you do everything right, you can still get a rash if your body isn't used to the climate.
I think if you keep the area as cool and dry as possible, or wear loose, breathable clothing, and avoid anything that might further irritate the skin, it should settle. If it's not improving after a few days, or it's getting worse, you should see a healthcare professional, cause several different skin conditions can look similar.
Hopefully it's just heat rash and clears up quickly. Spain is wonderful... except when it decides to leave you with an unwanted souvenir!