Passat and TL are mid-size, but in different classes, and the Maxima is closer to a full size (the Altima being the mid-size offering).
The TL is a little higher end than the Maxima and Passat. If you wanted comparables, the TL really competes A4 and G35, not the Passat and the Altima/Maxima.
Start with how big a car you want, and then decide if you want "near-luxury" as the TL is billed, or if you're okay with optioning out a Nissan or VW.
Personally, after dealing with some costly repairs on my wife's Passat, and absolutely horrid dealer support - including letting a lot of things go until the warranty ran, even though I kept bringing the car back for the same issue - I would never again purchase a VW. If Audi has the same dealer network/support protocol, I'd write them off too.
My father has a recent model Maxima. It's really nice, but it's a lot larger than the TL. He actually was deciding between those two cars, but he wanted the bigger car more than he wanted the features of the TL.
I wanted a TL when I was shopping for our newest car. However, AWD was a requirement, and the TL with that option was unjustifiably high - I ended up with a fully optioned Outback 3.6R and enough money left over to get another car when my wife's sick of fixing the '04 Passat.