You're assuming people "gain" abilities from landing in Gensokyo, which so far has not been the case at all. Every character shown has either always had their abilities (Miko, for instance, was always capable of hearing a person's ten desires, long before she arrived in Gensokyo) or, in the case of the ones whose abilities are "to use magic" or similar, trained to acquire them (like Marisa, Alice, Futo (who calls her mish-mash of shinto and taoist magic "feng shui"), etc). Kosuzu's the only character that was show to havie aquired her ability spontaneously, and we have no idea on how or why she got it.
As for ghosts of famous people getting into Gensokyo, well, I guess it depends whether or not everyone that dies goes to the same place. There have been no mentions of different afterlifes for different religions, so as far as we know everyone goes through the same processes. Theoretically, then, I guess such a thing could happen, but it's more likely that, if the person had died long ago, they'd already have reincarnated. Ghosts aren't suppose to linger there forever, after all.