An obvious difference between these two terms are their definitions. Pessimistic is defined as tending to see the worst aspect of things or believing that the worst will happen. Realistic is specified as showing a practical idea of what can be expected.
So why are they both used in the same light?
Nowadays, people of all ages have failed to differentiate the meaning of looking at a situation realistically and looking at it negatively.