I just bought a house and when we tore out the carpet this is what is looked like underneath. I would say padding. I had my floors refinished and they look amazing.
I wouldn't replace it bc good original hardwood like that is not easy to find or cheap. But there is no way to clean it, you'd HAVE to sand it down to original floors
OLD carpet padding has formaldehyde fumes that attacked shellac varnish wax on OLD hardwood floor products.
Modern Polyurethane finishes are more resistant AND modern pads have less fumes.
Who knows I would look into just replacing them and making sure there’s no roaches around there I think it would take more time and energy to send him down and re-stain them then it would just replace them