Great Expectations is clearly a morality tale. Pip thinks that his life will be better if he is less common. He wants status, if not wealth. He wants to be a match for Estella. Pip begins being ashamed of himself under Estella and Miss Havisham’s tutelage, but it is worse when he begins to be ashamed of Joe, who has only loved and protected Pip.
I am afraid I was ashamed of the dear good fellow—I know I was ashamed of him—when I saw that Estella stood at the back of Miss Havisham's chair, and that her eyes laughed mischievously. (ch 8, p. 71)
The adult Pip looks back at his former self with shame, but at the time Pip was ashamed of Joe, not ashamed of himself. Joe was coarse and common. He was everything Pip wanted to move beyond.
As soon as he gets his “great expectations” he begins to act snobbish and distant. He leaves home and rarely looks back. He does not visit, and when he does he stays in hotels. He visits when he has to, or to see Miss Havisham.
Most of the wealthy characters in the book act immorally, while the poor ones are paragons of humility and honesty. Joe and Biddy are perfect examples. Biddy tries to warn Pip that he has all the wealth he needs at home, in the non-material love she and Joe have for him.
“Biddy,” said I, with some severity, “I have particular reasons for wanting to be a gentleman.”
“You know best, Pip; but don't you think you are happier as you are?” (ch 17, p. 89)
If fact, it is not until Pip throws off the mantle of gentleman and begins to work for a living that he finally finds peace with himself. It is not hard to find the moral there.