So she has forgoten her name and all memory of her family & has never mentioned any of them or who she is to anyone ever again.
Possible I suppose, Amnesia from the shock of being abducted or brainwashed by a religious cult.
Yep, there are people who can erase the memory. A nasty process involving mental cruelty and the multiple splitting of the personality, IIRC, along with drugs to aid the process.
Once done the person can be re-progammed apparently to do as bidden ... and immediately forget what wrong doings they have done under command.
And a child of not yet 4 would not remember much anyway about her childhood, especially if her mind was full of distress. Madeleine appeared to be a highly intelligent little girl. maybe she would remember to an earlier stage that a less intelligent child.
Personally I can only remember back with any certainty to when I first started school at the age of 4. And I only have snatches of memory of that.