Any length of time
The pollution can essentially be tailored to fit any length of time, from microseconds to "longer than the existence of the universe" using the half-life of radioactive isotopes.
Assuming the pollution is the result of a specific industry on the planet, it can be lawfully evacuated by order of the Intergalactic Safety Regulation Committee. In other words, you don't actually have to poison the whole planet to black goo to force everyone to leave, you just need environmental regulation and aggressive enforcement of the evacuation.
If you need an exact transition date when colonists can reclaim the planet, have the Intergalactic Safety Regulation Committee designate the planet as "uninhabitable" until the radiation drops to a certain level – which is mathematically calculable. Flora and fauna will thrive long before the pollution has "disappeared" completely.
Disappear, or just drop below toxic levels?
The toxins may never disappear completely without a trace.
Re-colonists could return to find a "clean" planet, or a "less-toxic" planet, or a "still-very-toxic-but-we-made-a-deal-with-the-environmentalists-to-be-great-again" planet. It's up to you.