Even ignoring the Wish or Miracle (even if it didn't die, it'd pass out from the non-lethal damage if it overheated), there are ways to get around it:
Those spikes could be highly vascularized like a stegosaurus's plates or an elephant's ears. Its neck frill and long thin arms and fingers could likewise help regulate its temperature. Its mouth is also enormous and could potentially be used for evaporative cooling like a dog.
Finally, it spends most of its time underground and dormant. It could very well come out only at night or during periods of cold weather, which would protect it from overheating somewhat.
Or, y'know, magic.