How a being (be it a Buddha) can remember its past lives, if there is no "quid"/soul/self enduring for more time?
A self wouldn't help in this case; a self is an untenable entity - it is permanent yet able to change to know multiple objects, an illogical paradox.
The very idea that a memory can be stored isn't tenable, because memories don't exist, just as "information" doesn't exist. The "information" stored in the brain or on a floppy disk isn't information, it's just echos of experience. When one remembers, ostensibly it entails a convergence of many factors to contribute to the "memory"; given that precognition seems possible, even future events can contribute to "memories".
This doesn't answer your question; I suspect the question is unanswerable, just as "what causes gravity" is unanswerable. The universe isn't responsible for giving us answers to all our questions, but it does reveal the basic mechanics to us if we take the time to investigate.
In Buddhism kamma, the results of past deeds, is stored in the primodial consciousness.
Though different Buddhist schools have slightly different views of this consciousness.
Some questions are better left unanswerd and speculation about them should not obsess the mind.
At one time the Sublime One was abiding at Kosambi in a siṃsapā forest.
And there the Sublime One had taken up a few siṃsapā leaves in his hand and addressed the monks: “What do you think monks; which are greater in number, these few siṃsapā leaves in my hand or those that are in the siṃsapā forest above?”
“The siṃsapā leaves in the hand of the Sublime One are of smaller amount than those that are in the siṃsapā forest above.”
“Even so monks, it is just this way with those things of perfected knowledge that I have not taught. And why monks, have I not taught these?”
“Monks, indeed because these are not of significance to what is beneficial; neither do they lead to the principles of the renounced life, nor to disillusionment, nor to dispassion, nor to cessation, nor to peacefulness, nor to perfected knowledge, nor to awakening, nor to Nibbāna. It is for this reason that I have not taught these.”
Discourse in the Sīṃsapa Forest SN 5.12. 4. 1
You can't remember past lives. Memory comes from your 5 senses. With death, your 5 senses cease to exist. When your 5 senses cease to exist, memory ceases to exist.
You can only observe the truth within and outside you, and with your observation you can deduct or reconstruct your past lives.
It's like being a flower, not knowing who you are, observing, and then you realize: "oh I'm a flower, I came from a seed, it was carried by a bee, it came from another flower. This is who I was. Now I am here". As you can see, this is not memory, but pure observation.
In the same way as a flower, you can observe and realize: "oh I was a bird, I was suffering. Then I was a hunter in a forest, I was very angry. Then I was a farmer, I worked here and there, I was happy. Then I was... etc. This is who I was. Now I am here."