Usually questions about space-whales are a steaming pile of pseudoscientific twaddle, however, this question confines itself to something sensible. The OP may congratulate himself.
For the sake of scientific sanity, it is assumed that space-whales are otherwise whale-like creatures created by extremely advanced alien technological civilizations. Basically they are cyborg marine mammals equipped with environmental protection systems to enable them to survive in space, and a propulsion system for easy travel around the galaxy.
The core question is essentially whether dying or dead whales "beaching" themselves on alien planets can be a source of life dissemination. Basically, panspermia by dead space-whales. So the question is would this work?
Could life on a planet be initiated by the cells and tissues from a dead whale? The simple answer is no. Possibly the DNA from those cells might form the precursors to life on the planet, but this should be regarded as extremely improbable. So no.
What is more probable to be a source of life on a planet is the microbiota carried by the space-whale's body. If microbes could become established in the planet's environment they could colonize the planet. However, there are caveats about the fact that these micro-organisms will be well adapted to the environment and ecology of the space-whale's body this will make it improbable, but not impossible, for dead space-whales to be the vectors for spreading life to otherwise lifeless planets.
Possible, highly improbable.
May life even grow inside the corpse without ever needing to go out?
Sadly, no, even ten thousand ton dead space-whales don't last forever. Their tissues will either run out or break down to the point where the viable existence for any organisms living inside a dead space-whale will run out. Eventually the outside environment will break in, and the space-whale won't be anymore. So, for a short time, yes, but not in the long run.