I was going to post a long overly detailed analysis of the problem, but then I realized that I would have to do it without diagrams. Instead, I'll just say that if we're looking at a spherical distribution of matter through which an object is falling in a straight line, the only conditions on the density of the object to require it oscillate somehow are that it be constant in any given 1-dimensional ring of the sphere, perpendicular to the axis the object is falling along. Given a particular total mass, the density changing radially has no effect on anything, and the density changing along the axis will affect only the point around which the object oscillates, not the end points of oscillation (for example, if the earth were half lead and half cork, the object would accelerate/decelerate quickly on the lead half and slowly on the cork half, but will still turn around at the same places as it would if the earth's density were made uniform). In fact, if you don't mind the line not being straight and the object can magically pass through the sphere without interacting with it, the distance it rises on the ends of its various oscillations don't matter at all, though it will come out all over the place.
Keep in mind with the above that we are making a bunch of huge stupid assumptions: in both cases, we assume that the object's motion is unaffected by anything other than gravity, so no friction, and that the sphere is stationary relative to the object initially. Also, we are assuming in the second case that the 'hole' we are dropping it through has no width and is some kind of crazy wobbly shape. So the first case is a bit less crazy.
Now as for how well this models the earth, there are a few problems. Firstly, friction is unavoidable. Even if you filled a straight tunnel through the earth with vacuum, there are still virtual particles popping up every few attoseconds and screwing up the motion infinitesimally which will eventually (which here is basically equivalent to 'after a few trillion googleplex universe lifetimes' but is still smaller than an eternity) cause the motion to stabilize. Next, there's the object itself. Unless it is a particle, it has constituents (whether they are molecules, atoms, electrons or quarks) which have a small but finite chance of going off and doing their own thing. If it is beyond the scale of molecules it will almost immediately pull itself apart in the immense vacuum pressure. And if they're much smaller than atoms, quantum effects will noticeably affect its motion. Finally, the particles themselves may degrade over time, or emit energy spontaneously. Any one of these things happening has a very good chance of knocking it out of its pre-set axis, and causing it to bump into the side eventually. Of course, all of this applies to the particles making up the earth and vacuum generating device as well, though presumably you could negate the effects with some kind of particle shield attached to your vacuum generator.
Most of that only affects the motion after relatively huge time scales, but there are other problems which act much faster. Firstly, the earth is spinning, so as Karlito mentioned the Coriolis effect will change its path very quickly. This would be resolvable with either making the hole wider or drilling through the axis of rotation, except that axis also changes over time. Getting back to the huge timescales, the object's falling would actually cause the earth's axis to change slightly over time, until eventually the axis would be in the plane of the earth rotating around the sun, while the object would be doing who knows what at this point.
Finally, with regards to the non-sphericalness of the earth, this only actually matters less than you'd think. You can still consider the earth to be spherical, just with 0 density at some points.
I'm pretty sure that the above is mostly correct.