Cats evidently have a decent memory, as they can be taught tricks (though not easily). Furthermore, they are able to learn where their house is, and retrace their steps when wandering outside the house. I was washing my cat (to my cat's obvious outrage), and was wondering how long it would hold a grudge. Assuming cats can hold a grudge, and would form one after one such outrage, how long would they hold that grudge? How long would they remember the incident?
Actually your question isn't how long it can remember, but how long it will hold it against you, right?
Purely anecdotal: I have rarely seen a cat hold a grudge (emotional response) more than a week. However, I have seen them retain a behavior change after a single incident for much longer, if they are concerned about avoiding a repetition of an unpleasant experience.
So my best guess is that the cat is unlikely to think of you as "the bad person who washed me" for long, and will not seek revenge, and will not snub you generally for more than a few days. But the cat may try to take steps to avoid being washed again, and those may include staying a bit out of reach until it decides you aren't about to repeat this.
I am explicitly not asking why the situation arose. A cat rarely needs bathing, and in those rare cases there are ways to make it a more pleasant experience which you may want to review... but whatever has happened, has happened.