The 1.8T as long as it is maintained is an awesome engine. It is a very old engine, well tested and is pretty bomb proof, again if maintained.
Now keep in mind, other components have had failure points, coil packs, cats, O2 sensors, Mass airflow sensor, etc etc.
There are some sludge issues, though I think the Jetta's were not as impacted since the motor is transverse mounted instead of longitudally like the Passat and A4. Do some searching on sludge here and on sites like
http://www.vwvortex.com for more details.
I guess like any used car, it's going to be as good as the people who owned it. The CEL could be a number of things, if the light is on, you can always stop at places like PepBoys and they can pull the code, then you can cross reference that online. The gas cap can cause an emissions warning, usually loosening and retightening the gas cap, then after x number of cycles and driving it will go away if that is the issue.
So if the lights still on and you have time, stop by a store and get the code pulled, or look for someone on here or one of the other forums who has a VAG-COM that can scan the car for you. At least that way you will know exactly what the error is and know if it is worth worrying about or not.