Yup, the nebula is blasted into concentric layers that shrink back and we see the planet forming from the core outwards from scratch.
And this is essentially how Vonda McIntyre described it in her ST II novelization.
Until the protomatter subplot was retconned into ST III, the main reason the new planet was so unstable was because, instead of the Genesis torpedo being detonated over the surface of an existing planet, and terraforming it, Khan exploded it inside the Reliant
- and the device's program drew in material from the ship, its crew and the nebula gases instead... to create an entire planet. McIntyre also explains how the Genesis Cave and the Genesis Planet both appear to have natural light sources/suns.
A different tie-in book, William Rotsler's "Star Trek II Biographies", incorrectly assumes that it was Regula that was transformed, IIRC - and that the new planet is to be called Spock. In either the DC Comic or the ST III novelization (can't recall which), a revisit to Regula finds all the plant life overgrown and evolved, due to David's use of protomatter.
I've also heard of fans who reckoned it was Ceti Alpha V that was transformed at the end of ST II, but this would mean that Kyle, Beach and other crew from Reliant would have been killed. Kirk says that they are heading off to rescue the marooned crew.