Shakespeare himself was unusual among the ranks of Elizabethan dramatists in that he had not attended a university and did not come from an upper-class family—on the contrary, his father was a farmer and, subsequently, a glove-maker, and Shakespeare was only educated because he was lucky enough to live in Stratford, where schooling was free for boys. Despite his personal experience of transgressing class boundaries, however, the prospect of working class people moving from one class to another is treated with some ridicule in this play.
Malvolio, who dresses above his station and uses diction more suited to upper class speakers, is ultimately punished for thinking he could elevate his own position by being made to look ridiculous in the eyes of the audience and his would-be peers. The jester, Feste, on the other hand, is an extremely sympathetic character: like most of Shakespeare's fools, he is, in fact, extremely wise. While others in the play may treat him as if he is an idiot, the joke is ultimately on them as we, the audience, know that Feste is "wise enough to play the Fool." In dramatic terms, he is rewarded for remaining within his social boundaries: the audience laughs with him, rather than at him.