what are the advantages and disadvantages of tilt rotor vs ducted jet engine for a VTOL aircraft?
Well, engines and rotors obey the same laws regarding induced drag (induced power in this case) as wings: larger fan/propeller/rotor is more efficient, but limited to lower speeds. And from that, the advantages should be obvious:

Tiltrotors (V-22, AW609) are only a little less efficient in hover than normal helicopters, but they can only go around 300 knots (both aircraft have max speed quoted at 275 knots); above that, the tips would become supersonic and generate too much drag.
These can be built with engines similar to what a comparable fixed-wing turboprop aircraft would need and can cary comparable payloads with only slightly higher fuel burn. The AW609 is a product for civilian market aiming at charter operators supplying oil platforms and similar remote stations where it should be more efficient than helicopter.
The main disadvantage is that they are more complex and therefore more expensive to build and maintain.

Tiltjets/vectored thrust jets (VJ-101, Harrier, Yak-38, F-35B) are horribly inefficient in hover, but they can go fast.
Jet engine for thrust/weight ratio 1 (needed for hover) takes up most of the aircraft, leaving very little room for payload. Such design and thrust/weight ratio is common in fighters, but out of question for anything else.
This configuration also consumes a lot of fuel for take-off and landing. Absolutely no way would anything like that be competitive for commercial operation. However, the military is willing to pay it if they can have a fighter jet that can be deployed from an assault ship. And even they prefer conventional aircraft when possible.
This is really niche design, but one that offers enough tactical advantage that the Marines and the Royal Navy want it (US Navy will use the conventional F-35C with CATOBAR, Royal Navy decided it will be cheaper to use the STOVL F-35B version than upgrading the carrier they are building to CATOBAR).


I can't really compare maintenance. Obviously both are more complex than conventional aircraft and even than helicopters. But also, anything military is usually much more maintenance intensive than civilian designs, because military usually wants to squeeze out every bit of performance at the cost of simplicity.