A Sub floor is a flooring foundation which contributes to the stability of the structure of your floor, and if done correctly, it makes your floor durable and strong, along with the added benefit of being a ventilation system which keeps your property free of excessive moisture.
You can usually tell if your sub floor is unclean if you can smell bad smells coming from it such as urine or must. Even if you notice it being soft or bubbling in certain spots. This can be very bad as a dirty sub floor can destroy the entire structure for your floor. Visual indicators of a dirty or clogged sub floor is if you can see mould on it, or if it is damp. With hardwood floors, you could see cracks between boards as an indicator.
As sub floors are so rarely cleaned in so many households, they are a haven for termites, spiders, and rodents.
Cleaning a sub floor is far more difficult than you think, and you should get a professional to do it properly for you otherwise the situation could arise swiftly again.