In the 2015 film Pan, the workers and Captain Blackbeard sing "Smells Like Teen Spirit" by Nirvana and later "Blitzkrieg Bop" by The Ramones. While another question on this site explains the out-of-universe reasons why it is sung, I'd like to know in-universe how the pirates know the song at all. We see that Peter is from 1940s London (and returns there at the end of the movie), and there is no evidence of time travel. So how could Blackbeard and the others possibly know the words to the song?
According to this answer, the director simply chose Smells Like Teen Spirit because they were playing it during some sort of pirate bootcamp to train the extras, that song came on, and everyone starting singing and jumping up and down to it. They felt it was fun and added it to the movie.
As such, unless there's a direct explanation from either the director, writer, or anyone else involved in the production of the movie that has offered an in-universe explanation for why they know these songs, the answer is simply: there is none.
Anything else is simply conjecture.
The only logical answer based on the movie's timeline, would be that Nirvana met a Lost Boy or that they were Lost Boys and ripped off Blackbeard's music.
In the world of Pan, Nirvana are frauds, and Blackbeard and his crew were musical pioneers/savants.
If I remember correctly in Captain Blackbeard's "welcoming speech", he says that all the children come from across time. Could this not imply that somehow they can visit different periods in time and so become aware of music/songs from "the future" compared to Pan's time?
They do explain this in the movie just after the song has been sung blackbeard says, "you are home, where you join orphans alike from every corner of the globe, every race creed and colour, EVERY AGE AND ERA" so it stands to reason some of the people in the mines are from the 90's
There is a fan-made theory out there that would imply that the children and pan would be dead. If this is true, in the world of the dead there should be a Kurt Cobain rocking people out with all of his success from back when he was alive.
I know this is maybe not the anwser you were looking for, so let me add a purely speculative answer :
What if Nirvana and The Ramones existed in this universe. It would explain the pirates knowing the lyrics.
I'm afraid there is no real "Good" anwser, since all we can do is speculate on how can they know the songs.
The reason is Kurt Cobain is a lost boy. All of the lost boys come from different time periods. They are boys who nobody wanted or were so unhappy in their time lines they willingly left our universe and traveled to Neverland. Don't forget all the water-bubble universes they passed on their way to Neverland. Case in point: The actual story of Peter Pan occurs in Victorian-era England. But by this time, all of the lost boys are wearing rags, so they've been there quite a while. Also, Peter has been reduced to wearing clothes made of the vegetation. By the time we see him meeting Wendy, he's been there decades, at least.
Neverland doesn't exist in our timeline. Peter and the Pirates travel around all over time and invite "lost boys" to join them in Neverland. In some philosophical way,the story is saying Kurt Cobain isn't "dead" rather he has become a "lost boy" and is still existing somewhere, teaching others his great songs.
Lastly, Blackbeard does say that unwanted children have been taken from all over "across time".