Claudius certainly deserved what he got, but he could also have gotten more. I do appreciate the fact that he knows he is responsible for Gertrude's death, for it is the kind of suffering which he inflicts without caring about the consequences to others; however, the time between that realization and his own death is too short for my liking.
Laertes says he got what he deserved, so I will choose to believe him. He foolishly bought into the lies Claudius told him and was willing to compromise his own integrity based on those lies. When his plan goes awry and he discovers the truth, Laertes accepts his death as just punishment.
I think that Claudius gets what he deserves, but not so much with Laertes.
I feel sorry for Laertes. Claudius totally used him to get at Hamlet. Laertes had a right to want to kill Hamlet for killing his father, so I can't blame him for that. But I feel sorry for him because Claudius eggs him on.
At the end, you can see Laertes starting to have second thoughts about killing Hamlet. He seems to be repenting of his actions. I like him for that too.
So I wish that Laertes would not have died. I don't really think he deserves it the way that others in the play do.
Because you are asking it as an opinion question, you could obviously disagree if you want to, but I think Claudius and Laertes get exactly when they deserve, and so does Horatio as he makes his final remarks at the end of the play when is explaining all that has happened in Denmark.
When Laertes returns to Denmark demanding vengeance on Hamlet for the murder of his father, the devious plans are set in motion, and the arrogance of the two men leads to their downfall. Claudius sees Laertes's anger as the perfect vehicle for him get rid of the threat that Hamlet is to his own kingship. Claudius knows that Hamlet knows the whole truth of the murder of King Hamlet and wants to eliminate that threat. By playing into Laertes motives, the two of them come up with "fake" fencing match. The reason I call it fake is because they plan to sharpen the point of a sword (it should be blunted in a traditional fencing match), put a deadly poison on the sharpened sword, and, for good measure, put more of the deadly poison in a cup that Claudius will offer to Hamlet to toast his good play in the match. They arrogantly assume that the swords won't get mixed up or that someone else might drink the poisoned cup. They arrogantly assume that Hamlet won't be suspicious of the whole event.
When Hamlet is struck with the sword, he realizes it was sharpened and that alone makes him furious. He engages in swordplay to unhand that sword from Laertes so that he can strike him with it. At that point in the play he doesn't know it was also poisoned, but Laertes reveals the whole truth once he too is wounded with that fateful sword. Laertes certainly got what he deserved!
When Gertrude drinks from the poisoned cup and dies, revealing that she was poisoned, Hamlet is shocked. But Laertes dying words are the revelation of the whole plot, and Hamlet kills Claudius with the sword and the cup. Claudius certainly got what he deserved for causing Gertrude's death and ultimately Hamlet's. If a person makes a plan to kill someone, and the tables get turned, I think is a reasonable argument that he got what he deserved.
Horatio remarks to Fortinbras about the awful scene before him -- four dead bodies -- is quite a story. He says,
So shall you hear
Of carnal, bloody, and unnatural acts;
Of accidental judgements, casual slaughters;
Of deaths put on by cunning and forced cause;
And, in this upshot, purposes mistook
Fall'n on the inventor's heads.
Hortatio's understanding of the whole scene is that Laertes and Claudius got what they deserved when they created their devious scheme.