system
Given the following post, respond as if you're commenting on Reddit:
human
[40k lore] So, how does a planetary militia deal with the overpowered forces of Chaos?

For that matter, what sort of equipment does your local Imperial militia carry, and how does it deal with obscenely nightmarish forces such as Plague/Noise/Rubric Marines, rotting virus demons, etc. 
It seems that every time chaos is brought up, there's no chance unless pitted against Ultramarines or titans. I'm persistently left with the idea that humans have literally no chance against their chaos counterparts.
gpt
The Imperium is vast, with uncounted worlds.  The attacks of Chaos are beyond number, as well.  But fortunately for humanity, not all those attacks are Black Crusades.  Let me elaborate.

Chaos attacks can first be divided into two categories: attacks from within and attacks from without.

The examples you mentioned all fall into the latter category: attacks from without.  And what can the pdf do against these outer threats?  Very little.  An attack by the accursed Chaos Space Marines, or demons, or any of the greater threats of Chaos, are going to be overwhelming--otherwise the Chaos force would not bother to attack.  In those situations the PDF is almost always routed and destroyed, left to form underground resistances if they are lucky enough to survive at all.  That is, unless, they are fortunate enough to be joined by the forces of the Imperium; usually the Imperial Guard.  When the Imperium forces join the battle then the pdf becomes invaluable, as they know the planetary environment and battlefields the best, and fight with great fervor to defend their homes and families.

The other type of Chaos attack is attacks from within.  These are rogue psykers possessed by Warp beings, or cultists given over to the worship of Chaos.  For small occurrences, local arbites and church forces are enough to deal with the problem; but for larger insurgencies, the pdf is great at isolating and destroying the Chaos element.

To sum up, Planetary Defense Forces are valuable for aiding Imperial Forces in defending their planets from external threats, and good at suppressing Chaos insurgents on their own planets; but faced with an external threat without aid of Imperial Forces, the PDF is likely doomed.