What does Puck's soliloquy mean at the end of A Midsummer Night's Dream?
In Puck's speech at the end of Shakespeare's A Midsummer Night's Dream, just as in the "parabasis" of ancient Greek Old Comedy, a character breaks the "fourth wall" and speaks directly to the audience. This also breaks the illusion of the actor pretending to be a character, because the voice is, to a degree, a hybrid of the character and the playwright himself.
Just as in the traditional parabasis, in which the playwright urges the audience to rank the comedy they are watching higher than its competitors, so too in this speech does Puck talk self-reflexively about the play itself and the audience response to it. Here, Puck refers to the imaginary characters of the play and its events as "shadows" and apologizes if they have given offense. He deflects potential criticism of the play's frivolity by saying that first, the play is like a dream and has no permanent ill effects. Second, in the future he will make amends (i.e. if the audience didn't like this play, Shakespeare would write another one they might like better).
Puck is apologizing for the upsetting events in the play. Basically, he suggests to the audience that if the fairies' activities upset them, they could pretend it was all a dream and that the audience had merely slept there. Puck's final monologue sets things right with the audience.