The sentence "It shrunk on me." is not necessarily grammatically incorrect, but it is considered to be non-standard usage in formal writing. The more commonly accepted usage would be "It shrank on me."
The reason for this is that "shrank" is the past tense of the verb "shrink," whereas "shrunk" is a past participle. In most cases, the past participle is used in conjunction with an auxiliary verb (e.g. "It has shrunk on me."), while the past tense is used to describe a completed action in the past.
However, in colloquial or informal speech, it is not uncommon for people to use "shrunk" as the past tense of "shrink." While this may be acceptable in casual conversation, it is important to use standard grammar in formal writing or situations where clarity and precision are essential.