Well, all skater's programs are listed on the ISU's website. We could say, that since the top 5 usually participates in the GP, at their first grand prix event the programs are checked and compared to what they skated last season.
So the referee could look up what they listed last year and this year and see whether they're the same, apply a deduction before the skater ever takes the ice if they are.
However, sometimes the information submitted to the ISU website is incorrect. The skater might have updated it later. That might mean that this year's music is listed as last year's on the website even though the skater has changed music since they last updated the site. Or it's listed as something new when in fact the skater changed their mind since submitting to the site and went back to an old program.
Also sometimes the short and long programs are listed in the wrong spots.
And sometimes the skater might list partial information about the music one year and then add more/better information about the same music the next year.
Or list the same source of the music for both years, but in fact they're using completely different songs from the same musical or movie soundtrack etc. this year than they used last year.
If the music isn't familiar or if the way it's listed on the ISU website is different from the title by which this judge recognizes that music, they still may not be sure.
The skater may list a movie soundtrack when they're using a specific song or other piece of music that existed under its own name long before the movie was made. Or list the title of an aria when the judge only knows the name of the opera it comes from, or vice versa. Etc.
And remember, not all skaters speak English at all. Not all judges who do recognize a piece of music know it by the same title as the skater does.
So just relying on what's listed online will often be inaccurate. And unless last year's program was especially memorable or familiar, we can't count on the referee (or whoever) to hear this year's music once the skater actually performs it and realize "Hey, that's not what was listed on the website!"
Since the judges would deduct the PCS points, they should check it.
When? They don't hear what the skater is skating to this year until the program starts. They put their component scores into the computer immediately after the program ends while the tech panel is reviewing elements, or some judges might even put them in while the program is still in progress. Within minutes, the scores are finalized.
And we certainly don't want the judges to have access to the Internet on the judges' stand while they're judging. That would open up so many cans of worms unrelated to music repeats.
Should judges each attend the practices where the skaters' music is played (regardless of whether the skater actually performs the program at the time) and make mental notes about what the music is this year, and then go back to the hotel and look up last year's programs?
They're not allowed to bring written notes about the skaters to the judges' stand. So they would have to rely on memory.
That has nothing to do with repeating programs. It can be a brand new program, and still have a choreographic element that does not fit the music. In both cases, old or new program, the judges already have an option of marking down the appropriate component. As for an actual repeat of the element, who is going to say how many times is too much? You can only use an IB five times in your career? Two? Three? Four for hydroblade? Six for something else? If you restrict those elements, what about the others? How do you sort those out? Which have a limit, which don't? By what criteria? It's a pandora's box and it's completely unnecessary.
Some skaters have signature elements that fans expect to see from them, with variations if possible, in every program. Especially casual fans who only watch once a year or once every 4 years and remember specific skaters as "the guy with the [insert move here]"
"Variety" is one of the criteria for the Transitions component. So if a skater keeps using the same transitional move many times
in the same program at the expense of not using other kinds of moves, they'll suffer for the overuse there, and possibly under Composition as well. (Or be rewarded under Composition if repeating different variations on spirals or spread eagles or split jumps throughout the program helps tie it together thematically.)
Similarly, if the moves enhance the music and the choreography they can be rewarded under Composition, under Interpretation, under element GOEs. If the moves have nothing to do with the music, they won't get those rewards and might suffer in the CO and IN scores accordingly.
There's certainly no way for judges to keep track whether any of the highlight moves the skater performs tonight is an exact repeat from last night's SP or last year's program unless it was especially memorable (for good or for bad reasons), and the judge actually watched the previous performance(s).