If earth were to every pull back on that object, this is where its kinetic energy will come from. Regarding some other planet pulling it, note that there is currently potential energy stored in the object(when it is onearth), in the other planet's gravitational field.