Mold/Mildew smell in 1997 Subaru Outback after automatic carwash

How do I fix this problem?

If you have a cabin filter try replacing that. Do you notice any damp spots after a car wash?

'97 Subarus did not have cabin air filters.

The OP needs to give us a lot more detail, such as:

Were any windows open during the carwash?
Do you have a sun/moon roof? Is it leaking?
Is there evidence of leakage from window seals or at the tailgate?
Is the carpet wet, and if so, where is it wet?
Are the tail light lenses intact, or are they damaged?

Thanks for your reply.
No windows were open during the carwash. No sun/moon roof. No water leakage or dampness inside that I can see. No wet carpet. All light lenses appear to be intact.
I regularly use an automatic drive thru wash and have never had a problem before.

Well, it is important to dry out the interior as rapidly as possible. As Tom & Ray suggested on the program today, running the A/C for a few hours will help greatly to dry out the interior. Run it on the recirculate position, and set the temperature control for midway between the cold and hot settings.

After it has dried, then you need to obtain something that will kill the mold spores without ruining the carpet and/or upholstery, so that rules out bleach. As Ray and Tom suggested today, an auto detail shop should have the chemicals necessary to safely kill mold spores and to deodorize the interior.

But, remember that you do need to find out where the water came in, prior to your next visit to the carwash!

Where is the smell coming from, the cabin or the HVAC system?

The interior of the subaru did not get wet from the car wash.
The car was washed on a Friday afternoon and the smell was huge inside and outside of the car early the next morning when we were leaving on a trip.
The smell lessened some that day and has continued to diminish but it is still with us.
The smell is now coming from the HVAC system.
The drain for the AC is outputting water as it should.

Some car washes recycle a certain percentage of their water in the wash cycle to save on water. Sometimes this water can get pretty rank. Try a different car wash.

You may be able to take out the blower motor or blower speed control and wash out the evaporator case. I am not familiar with the Outback AC system so I can’t say it is practical or not.