It’s interesting the Buddha’s recollected jhana as a child, and not whatever he experienced under Kalama and Ramaputta. Also consider this:
“For a person whose mind is concentrated, there is no need for an act of will, ‘May I know & see things as they actually are.’ It is in the nature of things that a person whose mind is concentrated knows & sees things as they actually are." AN11.2
Considering quotes such as these I don’t think the Buddha practiced the real formless attainments years before his enlightenment. Whatever he experienced then wasn’t part of samadhi. I consider it more likely he was taught something else. And when he later went through the real formless attainments, he gave them the same name. (Or a perhaps a similar name that later got confused.)
Alexander Wynne has argued for this (or something like this) in The Origins Of Buddhist meditation, finding the precursors to the fake “formless states” in the Upanishads. (I only read a brief review, not the entire book.) Ajahn Brahm also mentioned a similar idea in Mindfulness, Bliss, and Beyond.
To me it is impossible the Buddha would have experienced the formless states and then neglected them in favor of asceticism. And so he experienced something else.