In simple words my theory is that Momonosuke retained Oden’s memories just like he inherited the ability to hear and talk Zunisha and order it.
The Voice of All Things, D. Clan, Kozuki Clan, Poneglyphs – It’s all Connected
The Voice of All Things is an ability that only D clan people were able to use/show so far in the story. – Only they were to hear Sea kings and other things.
So my guess is that Kozuki clan might also be a part of this infamous D clan. They are the ones who made the actual Poneglyphs.
And to safeguard this knowledge and information to read and write the Ancient Poneglyphs Kozuki clan had developed some way of passing it through the memories of the main family line i.e Oden and now Momonosuke. Or simply said this ability is probably just specific to their clan (just like Three-Eye Tribe can read the Poneglyphs). Like from father to son, from one generation to next memories passed through centuries.
It explains how he had Roger and Inuarashi-Nekomamushi being friends memories from 24 years ago even tho he is just a kid.
*Theory by Sanji W. Smoke