Correct colon and semi-colon usage?
The colon and semicolon are used properly in your sentence. The colon correctly introduces clauses of explanation related to the first part of the preceding clause, and the semicolon separates two clauses which are related, but not joined by a coordinating conjunction, such as and.
I would venture to say that the rich and the poor aren't the best terms to use in the explanation, since you began by addressing wealth vs. poverty. I'm not sure that it's wrong, but subjectively it feels like a disconnect. I would say:
Both wealth and poverty can produce a mindset of contempt and judgement toward the sufferings of others: wealth, because the rich are unacquainted with grief and so think that it is through some fault of the sufferer that they are so; poverty, because the poor have grown cold through their own hardships and have little compassion left to share. It is not a prejudice unique to any social class.