Can adequate heating transform spoiled food into safe food?
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.