I think it is established that the name Peter derives from Peter Llewelyn Davies. But Pan refers to the greek god Pan, who represents the natural world as opposed to the world of culture and civilisation. Barrie’s texts are suffused with comparisons and questions about how much of human behaviour is instinctive and how much has to be learnt which was a major obsession of post-Darwinian biology. I discuss this in my book ‘Peter Pan and the Mind of J. M. Barrie’. Peter, the betwixt-and-between, represents the natural freedom of childhood before the constraints of adulthood take hold. Various ‘wild-boys’ were examined medically in the late nineteenth century in an attempt to examine Man’s natural instincts without culture and the subject was much discussed amongst the intelligentsia of the time. Barrie would probably have known about this. Modern examination of drawings, descriptions and bones suggest that at least some of the children may have been expelled from their family and village because they were mentally or physically disabled, giving a false impression of the advantages of enculturation. So in answer to your question, I think Peter Pan is not based directly on Peter the Wild Boy, but the subject matter is related.