The referee and wrestlers all talk to each other during a match. Generally the referee is actually in charge of the timing so will tell the wrestlers when the end needs to come, so yes, they’ll be aware that a particular pin isn’t supposed to be the finish.
However, as TKC says, if the wrestler doesn’t kick out, they’re still expected to count to 3 and end the match early (except in cases where a crooked ref is part of the script).