MC – I’m a pro tiler/kitchen fitter.
Terracotta, I assume real Terracotta if they’re staining? how were they prepped before laying?
Procedure should be clean up and seal with Boiled Linseed Oil, At least 2 or 3 coats is usually required before going anywhere near the floor. This seals the pores in the stone and gives them a deep colour. Lay and grout, thoroughly clean and then apply further coats of Linseed Oil usually thinned down to wax/polish the surface.
It maybe that instead of Linseed a sealer such as HG Inpregnator has/should have been used.
Just re read your post and it sounds as though the floor hasn’t had enough/any sealer/Linseed on it before being waxed? Oil/Red wine etc will always stain Terracotta unless wiped up quickly.
There are products that will strip off the Wax of a sealed floor (HG terracotta remover for one) but not sure you’ll get the stain out if it’s soaked right in. You’d need to seal the individual pieces you treat afterwards as it will literally take the layers of sealer off.
If it’s not been sealed then I suggest stripping off the wax and sealing properly before rewaxing.
Best to get to a proper tile merchants and see what products they have available for you.
Done properly these floor will last hundreds of years…