Otiluke's Resilient Sphere blocks the ghost's ethereal travel
Any wall of magical force exists in and blocks movement in both the plane it exists on and the corresponding border ethereal, as described in the DMG's section on the Border Ethereal (emphasis added):
A traveler on the Ethereal Plane is invisible and utterly silent to someone on the overlapped plane, and solid objects on the overlapped plane don’t hamper the movement of a creature in the Border Ethereal. The exceptions are certain magical effects (including anything made of magical force) and living beings.
Otiluke's Resilient Sphere, which is a magic spell, creates "a sphere of shimmering force", which means the sphere's barrier is made of magical force that blocks ethereal travel. Hence, even if the ghost goes into the Ethereal Plane, it is still unable to enter the sphere (or escape it, if is trapped inside).
Incorporeal Movement probably doesn't help the ghost either
In addition to having access to the Ethereal Plane, the ghost also has Incorporeal Movement, which simply lets it pass through most things regardless of what plane it is currently on:
The ghost can move through other creatures and objects as if they were difficult terrain. It takes 5 (1d10) force damage if it ends its turn inside an object.
Unfortunately for the ghost, I don't believe a creation of magical force is the same as an object. I don't have an explicit reference for this, but for example, the text of disintegrate lists "object" and "magical force" separately, as if they are considered different things:
The target can be a creature, an object, or a creation of magical force, such as the wall created by wall of force.
Hence, I don't believe that the ghost's Incorporeal Movement is intended to allow the ghost to pass through barriers of magical force.