Can containers that held spoiled food be cleaned and be safe again?
If you can stomach opening the containers and the associated smell, most plastic and glass containers can be re-used with appropriate washing/sterilization.
I would discard the contents, rinse out the debris and scrub out any residue, including removing seals if possible. I would then soak in a 0.25% available chlorine solution (most household bleach is approx 4% available chlorine, dilute appropriately) for 30 min, then rinse the bleach off, wash in warm soapy water and dry. Bleach is very effective against bacterial and fungal contaminants. However, this approach can damage some components of containers, such as rubber seals, so treat with caution. Silicone seals/lids should be fine.
Plastic and glass containers can take up smells from the contents, as can the seals, so it would be worthwhile to give them the sniff test afterwards and see if you can smell any unpleasant smells that might be passed onto food subsequently stored in them.