I think
Die Leute sollen nicht pessimistisch sein.
is correct and a good translation in most cases. You could also use the indefinite pronoun man in this case:
Man soll nicht pessimistisch sein.
The difference between "die Leute" and "man" is just a nuance. The first one sounds more a statement related to a specific topic or time, the second one is more of a general assertion. Also, "die Leute" means "the society" or "the public."
Example:
Die Wirtschaft beginnt wieder zu wachsen. Die Leute sollen nicht pessimistisch sein.
vs.
Mein Vater hat immer wieder gesagt, man soll nicht pessimistisch sein.
"Der Mensch" sounds a little old-fashioned as if it was taken from a book of sayings:
Der Mensch soll nicht pessimistisch sein.
However, using "die Menschen" is acceptable in this case:
Die Menschen sollen nicht pessimistisch sein.
It has the same connotation as "Man soll..."