tokumaru wrote:And how did you find that out?!

A random Nicovideo comment, by way of a 4chan /a/ thread... it's a long story
So I did a bit of research. The "Yuurei Ressha" music was composed by Koichi Sugiyama, as should be obvious just by listening to the NSF... the resemblance to Dragon Quest music is palpable. The music in the Rayearth anime was composed by Hayato Matsuo, whom you could pretty much have called Sugiyama's protégé at the time: Matsuo broke into anime and game soundtracks respectively by arranging Sugiyama's Dragon Quest music for the Dai no Daibouken anime, and by working with Sugiyama and Hitoshi Sakimoto on the Megadrive version of Master of Monsters.
Rayearth was Matsuo's second anime project after Dai no Daibouken (and his first actually composing rather than arranging), and Sugiyama was credited as "music supervisor" for the series.
So I guess what happened is Matsuo got Sugiyama's permission to "recycle" one of his mentor's old and obscure compositions ("Yuurei Ressha" came out in 1991 and doesn't even have a J-Wikipedia page) as a Rayearth image song...