All three of them suffer. Miss Havisham starts the cycle by being jilted on her wedding day. The incident so scars her that she cannot function normally. She becomes a recluse and very nearly loses her mind. She lets everything about her life wither and die.
Miss Havisham tries to protect Estella from the pain men cause by training her to have no feelings whatsoever. In this way, Estella becomes Miss Havisham's weapon to get revenge on as many men as possible. Unfortunately, Estella chooses Drummle to settle in with because he is abusive most likely. She has learned that abuse is the way of life, and in marrying Drummle she both crushes Pip and seals her own fate.
Pip suffers under the curse of getting his wishes answered. Magwitch gives him the money he needs, but he is living a lie. The whole time he is learning to be a gentleman, he knows that it's not right for him. He assumes that he is being prepared by Miss Havisham, and when this turns out not to be the case he lets the illusion drop. He lives the rest of his life alone.
You need to remember that this novel is an example of a bildungsroman, which basically means it is a novel of education, where the main protagonist experiences various trials and temptations through which he learns valuable lessons and is able to assume his position in society by the end of the novel.
Of course, as your question points out, not only Pip, but Miss Havisham and Estella both learn valuable lessons through the suffering that they experience. Key to me is the incident where Pip "saves" Miss Havisham from being burnt to death, and himself is badly hurt. This represents his "purgatory" - the price he pays for the mistakes he has made in the novel, and after this he is a far more sober and mature individual who is able to reflect on his errors. Likewise Miss Havisham suffers through the lack of love she receives from Estella, her creation, and it is this suffering that allows her to beg Pip's pardon for the way she has used him. We see her development in the money she gives to Pip to pay for Herbert's partnership in his business. And lastly, Estella suffers through her marriage to "the Spider", Bentley Drummel, and in the traditional ending of the novel (for Dickens wrote two different endings), shows she has been able to move beyond the character that Miss Havisham made her and the ending offers some hope that instead of merely "breaking" hearts she can actually form a mature relationship.
"In what way have Pip, Estella, and Miss Havisham been instructed?" Pip, Estelle, Miss Havisham have all been instructed in some of the finest educational institutions. Pip and Estelle, and presumably Miss Havisham as well, have been instructed by good hearted and right minded counselors and advisers. Yet, as Estelle says, it is suffering that teaches the strongest lessons, which are the lessons that dictate choices in life and the decisions that lead to actions and behaviors.
After her jilting as a bride, Miss Havisham's intent to wreak vengeance upon men by teaching Estella to be cold-hearted and cruel recoils upon her since Estella, whose heartlessness cannot discriminate, can show no love for anyone. So, Miss Havisham has prevented herself from experiencing the love of a child she has raised. Thus, her suffering from Arthur and Compeyson's treachery has taught her that one "reaps what one sows" since she has imitated the men in their cruelty.
Estella, too, is victimized by the very quality that she uses to be the victimizer. In her coldness and cruelty, she has become unable to reciprocate to those that she could love such as Pip and Miss Havisham. Instead, she marries a cruel man, leaving her life in ruin.
Also, a victim of himself, Pip has suffered from his selfishness and false values. His guilt after treating Joe and Biddy so poorly and after being repulsed by Magwitch leads Pip to realize that despite his crudeness Magwitch is a loving and good person, and that Joe is the truest friend he has ever had and Biddy is a truly kind soul. He, too, suffers and learns, however, as having intended to propose to Biddy, he returns to the forge to find Joe and Biddy married to each other and Estella gone, as well.
Pip suffers because he is poor, he is abused by his sister Mrs Joe, he suffers because he is in love with Estella who does not love him back, and because Miss Havisham likes watching the girl torture him with her beauty.
Miss Havisham suffers because she was jilted at the alter, and she lives in the past--still in her state of preparation for the wedding, rotted cake and wedding food on the table.
Estella suffers because life does not cuddle and coddle her as she has been told it would. Miss Havisham had used the girl to get back at all men, and this, too, has effected Estella making her cold-hearted and unable to love as normal humans.