I'm personally pretty sure that there would be people that have matching trainer IDs on Pokemon caught by different people. That however isn't the only ID number of note.
Trainer IDs only go up to 65535, so there are 65536 possibilities (as 00000 is also a valid combination - and incidentally, 2 to the power of 16 is exactly 65536 -
that limit is no accident). Now, let's run some rough numbers and only consider ORAS. ORAS sold
~ 1.5 million in America, and
over 2 million in Japan already. Let's say Europe, Australia and etc give another 1.5 million, so 5 million games sold, and everyone who bought it played it enough to get a Trainer ID. Some people
must have matching ID numbers, as there's way more players than numbers. You only need 65537 players to be sure there is at least one match.
Incidentally, assuming an equal probability of any particular ID number (1/65536), and using binomial probability, the chance for one - and only one - person to have the particular ID number of, say, 00000 from 5 million players is... 5.6e-32, assuming I didn't screw up buttons on this calculator. That's extremely unlikely to happen (that's a 56 after 31 zeros after the decimal point, or). As for nobody to get it, it's more like 7.34e-34.
Now, that's only part of it, but the point is that there would be a lot of identical trainer ID numbers, especially when you throw in all the XY games, and Pokemon traded up from 3rd/4th/5th gen games, and that people may have started multiple save files as well. The other part is what about people receiving a Pokemon with an identical TID to them from a trade?
Well, in X&Y, we know there's been at least 100 million trades on the GTS. Let's go with five million players again (an underestimate of XY's sales!), and assume that everyone contributed 100/5 = 20 trades on the GTS (a bit silly, but let's go with averages). The chance that
you get at least one match from those twenty trades with your specific TID (going with that chance of 1/65536) is 1 - ~0.999695 = 0.000305 - a 61/200000 chance. This isn't likely [but better than finding a shiny Pokemon from one encounter! 1/4096 ~ 0.000244], but now consider five million traders doing the same thing. The chances of nobody getting a match from that is extremely small, and that's ignoring things like getting two matches from different people with each other rather than your own ID. On top of this, we're also ignoring a little thing called Wonder Trade. (Granted, we're also ignoring the chance someone gets the matching TID pokemon only to trade it away).
Lastly, this isn't the only way to differentiate who caught what Pokemon. You see, besides TIDs and the name of the trainer, there's one last number that is hidden from normal players, known as the SID (Secret ID). Bulbapedia quotes as follows (simply 1/65536 squared) the chance of both of these matching ignoring the trainer name bit for two players:
If two different Trainers have the same
Trainer name, identical ID numbers and identical hidden ID numbers (a 1 in 4,294,967,296 chance if the names do not differ), the game will recognize the two Trainers as the same, so the Pokémon are not considered to be
outsider Pokémon.
So you can assume that you getting a Pokemon that the game thinks you caught when you didn't is unlikely, or for that matter unlikely for that happening for anyone. If it has happened already, there hasn't been many occurrences of that at all. You'd have to hope for cases of a lot of players going with standard names, like Ash or default names (Brendan), or their own name if it's particularly popular/common.
I didn't even go Bayesian