Poor people are not necessarily unhappy.

Literal

Poor person [subject-が] necessarily unhappy [copula-である] [not-necessarily-とは限らない].

必ずしも...とは限らない is the standard pattern for 'not necessarily.' It allows for exceptions to a generalization. 不幸であるとは限らない means 'it's not necessarily the case that they're unhappy.' A nuanced philosophical statement.