Where are you building? I’m assuming this is the basement or the ground floor. What is the rest of the subfloor on that level?
Wood resting on dirt is a big no, so that is an obvious red flag. Whatever floor you put in, I’d preserve your access to that clean out. Once you answer my Qs above, I can help give you a recommendation.









https://www.owenscorning.com/en-us/insulation/commercial/enclosure/below-grade-under-slab-foamular-xps-insulation
I’d remove the existing wood, grade the soil flat and compact it. I’d then put down 2 in foam board (like in the link above) to decouple the flooring from the Earth. I would pour concrete to match the subfloor in the rest of the basement, but you don’t have to. You can go back with a pressure treated subfloor product on top of the foam, etc.
A few things to keep in mind would be making sure that you get the right height of the soil so that you have the finished flooring height you desire. Also, all this work assumes you are maintaining access to that clean out. Good luck.