Is there a pessimistic counterpart to the term "Pollyanna"?
Solution 1:
Eeyore is a pretty popular name to use in this context.
Eeyore is a character in the Winnie-the-Pooh books by A. A. Milne. He is generally characterized as a pessimistic, gloomy, depressed, anhedonic, old grey stuffed donkey who is a friend of the title character, Winnie-the-Pooh.
TVTropes names its depressed character trope "The Eeyore", and calls it "the polar opposite of The Pollyanna".
For example: 1 | 2
Solution 2:
It's not quite the opposite of Pollyanna but you might want to look at Cassandra from Greek mythology. See: https://en.m.wikipedia.org/wiki/Cassandra_(metaphor)
Cassandra was cursed with the gift of prophecy (generally of the doom and gloom pessimistic variety) but she was also cursed so that no one would take her seriously.
The phrase "Cassandra complex" is in current (if somewhat obscure) usage to describe a person prone to making dire and pessimistic predictions, especially ones that no one else takes seriously. See: https://www.learning-mind.com/cassandra-complex/
So if you want a female literary character who makes pessimistic pronouncements who's viewed as "foolish" (as no one takes her seriously), "Cassandra" may be your best bet.
There are other phrases that connote a pessimistic outlook, and one of these also has a feminine bent to it. A "negative Nancy" (sometimes modified to "negative Nelly") is a person who's endlessly pessimistic about everything. I'm not sure about the etymology.
Solution 3:
“Debbie Downer” is another option, similar to Negative Nancy.
Definition: https://www.dictionary.com/e/slang/debbie-downer/