The little kid is discovering two laws of physics, sunlight shadow and gravity. Like every learning process, it can be scary, painful, and fun (also amusing).
As for Peter Pan, it is usually said that it's heavily autobiographical, although one can wonder if the author did not connect to some mythological archetypes as well. After all, "Pan" is a very interesting deity of unclear origins. Peter Pan in the story acts like a psychopomp and a trickster. Also, it's not that he doesn't want to grow up, as if he chose through freewill not to live life, but he's literally "The Boy Who Wouldn't Grow Up" as if he was already in the realm of the dead. In fact, it's clear from the beginning of the story that the neverland exists within the psyche of the children, and that Peter Pan in a certain way haunts it. Maybe a rereading of the story (not the Disney version) would reveal more "sinister" aspects. OSIT