No, these ghosts don't appear in every game, however, there are a lot:
- A ghost girl in the Old Chateaux appears in the room farthest to the east on the second floor. She glides out of the room and cannot be seen again unless you enter the room again. She will only appear at random times you walk in. (D/P/Pt)
- A vanishing woman is in a house on Route 217. She gives you a Spell Tag, then disappears if you leave and re-enter the house. (D/P/Pt)
- A ghost girl on the Marvelous Bridge will appear near a man, and will disappear if you approach her (B/W). The same girl appears in the Strange House, referencing the bridge, her Abra and her parents as well as a dream she had. This dream led to the commonly accepted theory that she was killed by Darkrai in her nightmare.(B2/W2)
- A ghost girl in Lumiose City appears when you exit the elevator in a building (X/Y). This girl can be found again in a hotel room (X/Y) and again in Mt. Pyre. (OR/AS)
- A ghost girl is in Phoebe's room, sitting in the chair behind her for a split second while the camera dims. The same girl can be seen standing behind the player just before battling Phoebe. (OR/AS)
- Acerola appears before Totem Mimikyu's room, disappearing immediately if you try to take a photo of her. (US/UM)
- A ghost girl appears at the Trainer's School at night. She tells you about the 'seven mysteries' and the player can try to solve them. These mysteries involve several ghosts and battling ghost-type Pokémon. Once the player has solved them, she will disappear as a security officer appears. (US/UM)
- A vanishing girl appears in the Ferry Terminal, asking you to see her off as she leaves on a boat. As a Machamp walks in front of her, however, she disappears. (US/UM)
- A girl in Hammerlocke asks you to deliver a love letter to a person named Frank in Ballonlea. When you deliver the letter, you find that Frank is an old man and it is implied that the girl is the ghost of a girl that Frank used to play with when he was younger. The girl disappears after she gives you the letter. (SW/SH)
There is also a Hex Manaic in Mt. Pyre that says, "I want to see dreadful things... I can't leave... Stay... Won't you stay with me?"
Although it is likely that there are so many of these because they were so popular after their introduction in generation 4, there is a possible explanation for such a large quantity of female ghosts. In Japanese mythology, there are many myths and legends of monsters that appear as female humans, such as the Futakuchi-Onna, a woman with a mouth on the back of her head (the origin of Mawile) and the Yuki-Onna, a 3-metre-tall snow-woman who feasts on the spirits of travelers who become lost in the mountains (the origin of Froslass). These tales are often used to scare children and adults away from doing dangerous things.
Source
Futakuchi-Onna
Yuki-Onna
I hope this helped!