In such a phrase, although it is 3rd person singular, it is in fact the formal 'you'. It's not some lady who is not remembered, it's 'you'. The closest translation would be "He doesn't remember you, madame".
"On nie pamięta tej pani" would be in fact "He doesn't remember this lady", but if there isn't any demonstrative pronoun or something similar ("On nie pamięta żadnej pani" = He doesn't remember any lady) that means it is the formal singular 'you'.
PANI is a formal YOU, used to address directly a stranger, an elderly lady or a person in authority; this type of YOU goes with the 3rd person grammar (she).
It would be "a kind of a vocative" when you addressed the woman directly using the title Mrs./Ms. and her last name:
Mrs. Smith, he does not remember YOU -
Pani Smith, on PANI nie pamięta
Ma'am, YOU are very nice/ YOU are very nice, Ma'am -
PANI jest bardzo miła (not: PANI jesteś bardzo miła)
When you talk to someone else about this woman:
He doesn't remember Mrs. Smith (her) -
On nie pamięta pani Smith (jej)