I'd always go for the newest one first. Techwise, it'll last much longer. If you intend to take photography classes, then either Canon or Pentax will do fine. Just keep in mind that you're buying into a system, not just a camera. I prefer the Canon system and their 200+ lenses available for the XSi. If you want to take this hobby beyond just a hobby, you'll be hard pressed to find Pentax pro-grade DSLR's that can rival Nikon D series or Canon Mark series.
Well, that depends. On pure image quality, from everything I've seen, the K20D can generally at least match the D300 (which I'd say is/was the benchmark for APS-sensor DSLRs) while giving an extra ~2.6 megapixels and can give the big-dollar Canons a
very serious run for their money. The D3 is playing in a different league from most others at this point - but then, it's better at sports than the higher-mp full-frame Canon, which is better at studio. The K20D does lack the machine-gun continuous speed of the D300, but note that the D300 slows way down (2.5 fps) when recording 14-bit RAWs... the K20D is recording larger images... and the 40D's high speed is somewhat due to the relatively small 10 mp images it outputs. Each one is a bit of a compromise. The only other question is autofocus, the K20D is very good but probably not
quite as good as the D300's 51-point system. Regardless, it's a pretty compelling package, especially coming in at somewhere around $600-700 cheaper than the D300, and being smaller (5.6 x 4.0 x 2.76" vs the D300's 5.8 x 4.5 x 2.9") and lighter (715g vs 825g, both w/o battery) and including built-in IS. It's also smaller/lighter than the 40D, though the price is similar, but is positioned somewhere above the 40D in terms of features (weathersealing, etc).
Anyway, I do think that the talk of "buy one system in case you go pro" is somewhat overrated. Pros can certainly handle switching systems and they do, and chances are that someone just starting out with an entry-level DSLR and basic glass will replace pretty much everything they have as they move up the chain. Heck, I think that happens even with people sticking with the same system. My basic system used to be an *ist DL with 18-55mm, 50-200mm, 50mm F1.4, and Zenitar 16mm fisheye. Then it was a K100D. Now most of my shooting is with a K20D, Tamron 28-75mm (probably to be replaced with Pentax 16-50mm one of these days), 50-135mm, 31mm F1.8, and 10-17mm. I could have just as easily sold my Pentax gear and switched systems if I found something compelling elsewhere, and probably actually lost very little money as there's still good demand for much of that gear.
Furthermore, how many people are ever really going to go pro? Hey, I'd like to become a pro race driver but I'm not going to buy a Ferrari just in case I go to work for the Scuderia.
And to be fair, there are a huge amount of lenses available for the Pentax if you're willing to look beyond what you'll find at Ritz, and even on current stuff, there are very few (if any) "holes" that are missing in terms of new lenses.
Why not consider Nikon? I'm a big Canon fan, but Nikon has the edge in camera bodies today (at least at the mid to high end).
Indeed, if you're looking at buying your first DSLR, you really can't ignore Nikon at this point, and IMHO have to have a pretty good reason to rule them out. Of course, if your budget is closer to $1,000 than $2,000 (which I assume it is since the OP's first considerations were XTi vs XSi), then the D80 is starting to get a little bit old compared to the 40D, and without seeing some direct comparisons, I think the D60 might have tougher competition with the XSi than the XTi - the XSi has a number of new features while the D60 is little changed from the D40x. No doubt that we'll continue to see several different companies taking the lead in various categories as time goes on, and today's best DSLRs will continue to be outclassed by what's coming.
HDD, quick thoughts on your final picks - as someone else (I think said), the K20D and Samsung GX20 are virtually the same camera. The XSi is entry-level and won't have the features or controls that you'll find on the 20D/GX20/40D but will be a bit smaller and lighter.