IF we consider the earth perfectly spherical then it is symmetrical about any of its diametrical axis.
so if we think of the earth divided about the any diametrical axis then it will be divided into two halves infact two symmetrical halves.
Now think about the gravitational field of each of the halves saperately.
At the centre the net force will be zero but as the ball goes ahead by the virtue of its velocity.The net force force will be towards the
farther halve (this is so because as we go deeper inside the earth the value of "g" decreases and hence the force) .So the next external force will
be towards the opposite side of the motion of the ball and hence the net force will also be opposite to the displacement covered which is a
satisfactory condition for the S.H.M.So the ball will execute the simple harmpnic motion .