I would guess causality runs the other way: people with high stress in life have lower life expectancy and also tend to be less optimistic because it’s easier to be optimistic if things are going well for you
Even in this third option there exist an infinite number of sub options on a gradient (where each direction carries more or less weight).
Of course, any meaningful conversation can only happen after definitions (like what is pessimistic) are agreed upon. I for one don't agree with the definition of pessimism as defined by the study.
It’s well known that two people can have the exact same experience (e.g. fighting in a war, experience a natural disaster) and have vastly different psychological outcomes from it. Some can deal with it easily, while others are crippled by it.