One of the reasons that Pip was so miserable when he went to London is because he did not really fit in there. In training to become a gentleman, he was trying to become what he was not. Nothing is what he expected. The people in the city generally only care about him as long as he has money, and only to the extent that he can do something for them.
I think this exemplifies itself further in the character of Estella. Estella never had an opportunity to create her own identity until much later in life. In fact, her mother's training certainly created a place of belonging that felt comfortable while there, but it created a character in the long run that I am not sure Estella was happy being. In fact, her character is a stern warning to guard ourselves from influence that shapes identity that we may not necessarily desire.
In many ways, Great Expecations is an existential novel as, mistakenly, Pip assumes that he will find identity by becoming a gentleman. For, his aspirations to move in social class do nothing for his creation of self. It is only when he puts aside the notions of status that Pip becomes authentic in his existence; it is only when he tends the dying Provis with love, and when he forgives Miss Havisham and lovingly rescues her from the fire that Pip purges himself of the false identity he has sought and becomes a genuine person.
Left without his false values, Pip no longer belongs anywhere, it is true. However, existentially, man indeed is truly alone, and must create for himself his own existence. Pip does do this, so he, at least, finally belongs to himself in being.
Dickens was challenging the class system and the long-held belief that everyone had their 'place' in society. Pip's journey within the novel is exploring the implications of a breadth of opportunity, and the exciting notion that one can be whomever one chooses. Pip finds his journey both joyful and painful, and emerges alone, though still with a connection to those of his past; most immediately Estella. Pip is representative of the emerging middle class - initally isolated but with a sense of making his own place in the world rather than 'belonging' to a pre-determined plan. Pip is clear of his own identity at the end of the novel. He is defined by his connections with others and also the gulfs between them.
I think that this novel definitely proves that Pip's great expectations unmoor him from his stable base and identity, letting him drift off into what turns out to be a rather unsatisfactory life in London for lots of reasons and causing him to turn on his old friends and home. It is his great expectations that result in his unhappiness, and it is only after the somewhat cathartic incident with Miss Havisham towards the end of the novel that he is able to reclaim some lingering sense of who he is as an individual and find something approaching happiness.
Pip belongs to Joe and Mrs. Joe, somewhat (Mrs. Joe is abusive), but he is unsure of his place in the world for much of the book. It isn't until he decides that he will marry Biddy and live with her near Joe instead of the hustle and bustle of the dirty, busy city that he reclaims who he is. Of course, this is destroyed when he returns home to discover that Joe has married Biddy and they are very happy together being plain, uneducated, and far from the "gentleman" title Pip has been attempting to achieve. Because of his education and money, Pip finds he doesn't really belong with his family, but he never really fit into the city crowd, either. He is a bit of an outcast all around.