Janeway and Chakotay are left on a planet due to the planet affording them protection from a virus they had contracted from some bugs that lived on the planet.
What about this planet protected them from the virus?
This is never explained in detail. From the Star Trek Memory Alpha Wiki:
It appears that the only way the two officers can avoid developing the deadly symptoms is to remain on the planet, where an unknown element is able to protect them for the disease's effects.
Ultimately a cure/serum is provided by the Vidiians.