I feel that there may be one other reason why people may be treated badly, and it doesn't have to do with self-esteem. Some people are so kind that their kindness might be mistaken for weakness.
What such people need to be, in my opinion, is both kind and assertive—provide value for others without letting others take advantage of them.
RE: Why Self Respect Is Important for Success