Possibles if the starter itself is OK (though none exactly fit the circumstances as you've laid them out):
Missing teeth on the flywheel. Starter would spin without driving the crankshaft, can sometimes be diagnosed by moving the engine round a bit (bumping etc), and seeing if the starter will then engage, or by visual inspection of the flywheel edge with starter removed. (Doesn't fit if the car jumps and stalls out the starter when in gear).
Broken/stripped timing belt or timing gear. Starter would turn the crankshaft and serpentine belt (alternator etc), but camshaft pulley stays still. Starter often seems to spin quicker than normal due to no compression (Doesn't fit if all pulleys inc camshaft turn when bumping it).
Broken crankshaft key/keyway or crankshaft itself. Same as above, but crankshaft pulley and serpentine belt don't move either. Doesn't fit if crankshaft pulley turns when bumping (Had this myself on a Ur Quattro donkeys years ago, turned out to be the crankshaft key that was sheared).
Broken flywheel bolts. Starter engages and turns flywheel, but none of the pulleys move. (Doesn't fit as pulleys turn when bumping)
Broken Dual mass flywheel. Same as above (but I don't know if there's any way it could fail that would cause it to catch when in gear, thus turning the pulleys on a bump - Anyone with some DMF experience want to chime in on this?)
Starter motor supply or earth fault could cause the starter to behave oddly/fail to engage. (Doesn't really fit if starting in gear makes the car jump and stalls the starter, but electrical faults can cause some bizzare behaviour.
The last one still seems to be vaguely possible to me. Especially if the starter was fine on a bench test (different wiring being used).
How hard does the car try to move forward if trying to start in gear? (With the handbrake off and slipping the clutch a little most cars will actually move a fair way doing this, BUT it's a good way to burn out your starter/wiring or strip flywheel teeth
)
If the car doesn't really try to shift before the starter stalls out, it normally indicates a low battery or dodgy supply/earth wiring.
Personally I'd recheck the supply and earth cables, check the battery condition (inc voltage drop when cranking), then probably try another starter motor. Hard to diagnose much further without more info or seeing the thing.....