What specifically happens will depend on whether the mold is hazardous or non-hazardous. Do that before committing to any plan of action. If you haven’t got mold or mildew yet, paint over high humidity areas with paint that resists its formation and spread. If you absolutely must paint over mildew, you should only do it over non-toxic cases so that it doesn’t become a threat to the occupants.
When you paint over mildew, you fail to remove the problem or eliminate the symptoms stemming from that problem. All you do is remove the mildew from sight. This may make a room look better and grant you peace of mind but that mildew is still there and still causing damage to your home.
If the mildew is caused by water damage somewhere in your home, the problem will get even worse after you paint over it. Moist and humid closed spaces are where molds and mildews thrive, so you’re only helping them grow by shielding them. You cut off the circulation of fresh air too, so the mildew will only spread and grow in severity. If the affected area is a humid room, like a kitchen, basements, or bathrooms.