The lesson of this story (which is really more of a sketch than a story), is that art is actually an illusion. Everyone has a different opinion. Everyone is a critic. The author also has a lot of cynicism embedded in the story.
In this eNotes Educator's opinion, our own website says it best:
The illusion created is, as the music critic suggests, “the most artistic thing of all.” Art, by definition, is contrived; it is artifice.
In other words, it is the music critic that gives the most insight into the story. Music, as a form of art, is completely fake, completely an illusion. It is not real. In fact, the author says the following:
[The story is about the] impress of much melancholy and ironic reflection on the subject of art and the artist.
The many different observers (the music critic, the piano teacher, the military man, the older princess, the musician himself, etc.) all have different opinions and none of their opinions can be considered real or true.
Looking at the reaction of the actual artist or musician here, even he is the infant illusion from the title. As he is not even an infant (at eight years old) and he is more about the show than the actual music, he is not real either. Further, he regards everyone else's comments as "stupid."
I guess, if one wanted to put a positive spin on the story, one could say that the lesson is really that music, and in fact all art, is in the eye of the beholder. Still, it is truly hard to put any positive spin on a story with this much cynicism about art.