Spain is on the brink of a third heatwave after an already record-shattering summer.