A few dictionaries (notably not the RAE) note that "quedársele a alguien" can be used as a synonym for "recordar" or "retener información."
- No se me queda la lección después de haberla aprendido.
- Está muy mayor, no se le quedan las cosas.
This seems to be a regionalism. I have asked some Spaniards about this, some from Galicia and others from Madrid, and they gave mixed responses. Those from Madrid were most comfortable with this use. The Mexicans I asked were not at all. One Salvadoran friend told me it seemed perfectly fine. Is it understood where this use of quedársele is common, and is there a reason why it isn't included in the very expansive definitions in the RAE?
Sources: https://www.collinsdictionary.com/dictionary/spanish-english/quedarse https://www.spanishdict.com/translate/quedarse https://dle.rae.es/quedar