All's Well that Ends Well is a startling play and Shakespeare at close to his most experimental. It is closely related to Measure for Measure, but I think it is a better and more complex play than that. It is another example, one of many, of Shakespeare undermining the conventions of comedy and while it seems light and breezy on the surface it is a bitter little pill in the end.
The play has Helena a virtuous and lovely woman but of a middle class background fall in love with Bertram a shallow, womanizing, warmongering cad. By saving the King's life Helena gets her wish of being married to Bertram but he immediately runs away and the rest of the play concerns Helena's trick to get him back, while Bertram is busy trying to take the maidenhead of virgins. Like Measure for Measure the politics of virginity are never far away. However, unlike Measure for Measure the "happy" ending is even more radically undermined while strictly adhering to the conventions of comedy. Bertram and Helena end up together, but Bertram has proved himself so worthless that one cannot see it as happy. Shakespeare even goes so far as to put the title of the play in Helena's mouth twice emphasizing its ironic aspect. Like As You Like It the play has many funny moments and is within the conventions of a comedy while satirizing it. Unlike As You Like It he gives the play an unstable ending.
I haven't mentioned Parolles who is the conventional scoundrel friend of the hero that we find so often in Shakespeare. He's one of the better ones being a complete scoundrel and when we laugh at him we are uncomfortable because his villainy is more concrete.
All's Well That Ends Well is often now considered one of the "Problem" plays because it does not fit neatly into the conventions of comedy. I have a bit of a problem with that label, because I think there are more of the Comedies that either undermine the conventions of comedy or that hijack them for a more complex purpose. Basically, Shakespeare wrote a straight ahead comedy in The Comedy of Errors and spent the rest of his time playing with or undermining the genre.
I also think that the play is also an attack on social class. It has a speech assaulting class roles put into the King of France's mouth of all people. That aspect is very surprising. Those kinds of topics were always things that I thought that Shakespeare had no interest in.
All's Well That End's Well is better than its reputation would suggest. Its a play with great dialogue but designed to lull the audience in and then unsettle them while making them laugh. I would certainly put it in the top half of Shakespeare's plays, bitter little pill that it is.