Dystopian and horror-oriented science fiction have existed as long as the genre.
Optimism is hard to do in a way that is both believable and interesting, which at the time TNG ran was fairly successfully achieved for a large audience.
I would argue that cynicism and fear-milking are easier paths (with certain exceptions for works which evoke multiple layered allegories and inspire contemplation), and I think this has become even more true in recent years for a host of reasons.
I would argue that cynicism and fear-milking are easier paths (with certain exceptions for works which evoke multiple layered allegories and inspire contemplation), and I think this has become even more true in recent years for a host of reasons.