If you think about it, your question applies in exactly the same way to a conventional helicopter. You might expect that it would pitch nose-down if the weight is forward, and nose-up if the weight is aft. In fact, it's even worse for a conventional helicopter, because with only one rotor it would roll (tilt left-right) as well as pitch.
The answer is the same for the Osprey as for a conventional helicopter: the pitch is controlled by cyclic control of the rotor. As the rotor spins, a mechanism inside it changes the angle of attack of the blade (the pitch of the blade) as it rotates. This change can cause it to generate more lift when it's at the rear than at the front (or vice-versa, or left-to-right). This creates a turning moment about the centre of the rotor disk, which counteracts the moment of the unbalanced weight.
You only get so much of a moment with it, though. The aircraft needs that moment in order to change its pitch to manoeuvre. If you had to use the full range of blade pitch (the maximum cyclic control) just to counteract the unbalanced weight, you wouldn't be able to pitch the aircraft any further in that direction. For this reason, the maximum moment of rotorcraft (how far the centre of mass can be away from the centre of lift) is typically smaller than for airplanes.