They weren’t named in the books - but JKR said she had more.
The only ghosts actually named in the books are the four House ghosts, Moaning Myrtle, Professor Binns and Peeves (though he’s a poltergeist, not actually a ghost, and not considered as one by the Hogwarts ghosts either). However, JKR did have names for a few other ghosts who were never mentioned in the books or movies.
In the very earliest list of ghosts I ever wrote for Hogwarts, I included Myrtle (initially named ‘Wailing Wanda’), Professor Binns, the Grey Lady (then called ‘the Whispering Lady’) and the Bloody Baron. There was also a Black Knight, The Toad (which left ectoplasm all over its classroom), and a ghost I rather regret not using: his name was Edmund Grubb, and the notes beside his name say: ‘Expired in the doorway of the Dining Hall. Sometimes stops people getting in, out of spite. Fat Victorian ghost. (Ate poisonous berries).’
Hogwarts Ghosts (Pottermore)
In the books, though, none of those names are used - the other 14 (or 13 if counting Peeves the Poltergeist) are unnamed, similarly to how we don’t know the names of every student at Hogwarts, though we know there are more than the named ones.
They seemed to be residents - they were arguing about Peeves.
The about-twenty ghosts who were talking amongst themselves were talking about Peeves, and what they should do about him. This doesn’t seem like something the Headless Hunt, or other visiting ghosts, would be discussing.
“He gasped. So did the people around him. About twenty ghosts had just streamed through the back wall. Pearly-white and slightly transparent, they glided across the room talking to each other and hardly glancing at the first-years. They seemed to be arguing. What looked like a fat little monk was saying, ‘Forgive and forget, I say, we ought to give him a second chance –’
‘My dear Friar, haven’t we given Peeves all the chances he deserves? He gives us all a bad name and you know, he’s not really even a ghost – I say, what are you all doing here?”
- Harry Potter and the Philosopher's Stone, Chapter 7 (The Sorting Hat)
Since the ghosts all seem to be arguing about Peeves, a problem unique to Hogwarts that visitors likely wouldn’t care enough to be arguing over, it seems likely that the ghosts involved in that conversation were residents of Hogwarts.