My plants (basil and mint) were infested with mealybugs. Nearly all of them perished (despite application of neem oil) and I am left with several pots of soil that have not been growing anything for several months now. Since the soil has not been growing anything for several months now, won't the mealybugs that were present in the soil have died off? Can I safely reuse the soil for growing now? I have also poured boling water into the soil to try killing them off too.
The best thing to do is get rid of the soil in the pots, thoroughly clean the containers, then refill with new potting soil. Either that or turn all the pots out and mix the soil up, examining it as you go to see if there's anything in it you don't want, like ants nests or larvae.
You will need to take precautions to keep ants away - raising the pots off the ground helps, but you may still need to use an ant powder or whatever you have available to keep them off, so keep a check on their activity. Treating mealybug on the upper parts of edible plants isn't as easy as it is on non edibles. You could use some sticky traps hung above the plants to trap any male mealybugs flying in, and an insecticidal soap spray would be useful, that or neem, but you must treat the plants immediately you see a problem, don't leave it, and you will need to treat regularly if mealybug is a major problem. More information can be found here: How to Get Rid of Mealy Bugs on Basil Plants.