What is the long term psychological effect on those who were bullied a lot in school?

Variable. I've seen some who had severe anxiety disorders later -- but it's impossible to know whether an existing tendency like this could attract other kids to bully them. The bullying definitely makes it worse. I've also known some who incorporated this bullying into their own personality style -- & continue expressing it as adults. They pass it on to their kids, who look for somebody to bully. A cycle.
Varies. What does not kill you makes you stronger. Probably everyone is bullied as a child. The extent and severity likely vary considerably. The experience will have an effect, but one cannot say what that will be. In some cases it makes one stronger while in others it can lead to permanent psychological damage.