In the first and second examples, X refers to the original level it arrived.
The third X represents the region it was caught in. In ORAS, instead of saying "the Hoenn region", it is ommited and changed to "you", assumingly because of awkwardness if a Gen 3 Poke showed up in ORAS (mentioning Hoenn twice). Here, X can represent Gen 3 Hoenn and Kanto, Johto (which I believe would also represent HGSS Kanto), and Unova. If it was taken from X/Y, I think it would probably just preserve the information.
A similar message appears if transferring from 6 to 7. I don't think it would mention traveling to Kalos or Hoenn, since old Hoenn and Johto Pokes don't mention stuff that was in between.
The one thing I can't try is moving something from BW to XY and then trading to ORAS; I have never done that, nor do I have XY. I don't have any like that from other people either. I would assume it was marked to have come into Kalos.