Yep, it’s a coincidence that the Earth is made of rock, and iron, with a core of molten material.
So, we have to conduct your experiment on another solid object of the same size, which is solid clear through. Solid what? Tungsten might be strong enough to resist flowing back into a tunnel bored eight thousand miles through it. I don’t think so, but hey, I don’t have a cite to prove it isn’t. (Hint: Did you ever wonder why there is so much round stuff in the universe?) Oh, wait, tungsten is too dense, the gravity would be too high.
But hey, like I said, we are picking and choosing our physics here, and requiring strict mathematics at the same time, once we make our choice. So, we make it out of a special alloy with the same proportional density as the earth at every level, but an incredible tensile and compressive strength. (Hey, it worked for Larry Niven, why not us?)
The outer walls of our tube are frictionless. I don’t think anyone has finally decided about air. If there is air, you get slowed down to zero, probably a couple of hundred feet either before or after the center. (I don’t know if you would float in air at the center, maybe, maybe not, depending on the physics chosen for that one.) If there is not air, well, imagine a physics that keeps it out.
The shape of the tube has to be different for falling through, and falling back. Unless you want to imagine a physics that lets it be straight. Once you imagine that, you can fall straight through, and straight back. In fact, you can fall out the other end, and have Australians offer you shrimp on the barbie.
Without the magic, it cannot be there at all. With magic, all things are possible, and you can do the math any way you want. So, how do you want to do the math?
Tris