Shared with you
The orphan who gets into the pie dough and eats all of it, and is shown throwing up all over the orphanage, is named "Steerforth". Steerforth is the name of one of the main character's friends in the Charles Dickens book "David Copperfield", which Homer reads to the children in their bedroom.
The scenes featuring the orphanage were filmed at the Northampton State Hospital, an abandoned mental asylum in Northampton, Massachusetts.
One of the attractions of adapting this movie for author John Irving was that he wanted his son, Colin Irving, to play Wally Worthington. However, as the development process took over a decade, eventually his son was too old for the part, and was not known enough to be considered for it in any event. However, the role of Major Winslow did ultimately provide Colin Irving a part in this movie.
It was because of this film that director Sam Raimi wanted Tobey Maguire to play Peter Parker/Spider-Man in Spider-Man (2002).