Can adequate heating transform spoiled food into safe food? Suppose I have some food that became unsafe or contaminated by any means besides explicitly adding dangerous substances.  It could be past the expiration date, or handled unsafely by leaving at room temperature too long, etc.  Another possibility to consider is botulism from damaged cans.  

Would it be possible to resurrect food from these situations, making it safe, by sufficiently heating it?
That'd depend on the exact microbes involved in making it unsafe (or, since you probably don't know, the short answer is "no").

There are basically two ways microbial growth makes food unsafe: either by the presence of the microbes themselves, or by toxins the microbes create. Sufficiently heating the food will kill enough microbes, so those ones will be taken care of. Unfortunately, some of the toxins are heat stable, and it just isn't possible to heat the food to a high enough temperature to destroy these toxins without turning the food to charcoal.

The FDA's Bad Bug Book gives details about specific pathogens and their heat-stable and heat-labile toxins.