I've owned both; a used 2008 Sonata, a new 2009 Sonata and my 2011 five door SX. I would say the quality is comparable but I do have one somewhat insignificant complaint but I notice these things. The damping that was in the sun visor and the hand grips above the doors does not exist in the Kia. Personally, this is penny wise and pound foolish to have cut this out. Little things like that are noticed.
The other day I happened to park next to a Hyundai Elantra touring to see what the differences were. The colors were identical but there were some differences. The cargo was greater on the Touring and it has two additional gauges in the dash and the illumination is blue, which I prefer, over the red in the Kia. I think the steering wheel is more "luxurious" in the Elantra. The cargo cover is better in the Hyundai. So why didn't I buy it? Because it came only with the 2.0 and four speed transmission. Yet the Kia SX comes with the 2.4 and six speed transmission. Go figure.
An eight way power seat would have been nice and I believe the new Ford Focus comes with that. Neither the Kia nor the Hyundai have the power seat. ??? I don't know of any practical way to install a power seat in either. I did that in one of Sonatas that didn't have it. If I could figure out how to do that with perhaps a seat from an Optima I would consider that. Don't know if the seats differ substantially, however. It is a relatively simple hookup; not at all complicated such as trying to put in fog lamps or finger tip controls on the steering wheel. The former is very difficult and the latter nearly impossible. However, the Kia has those so nothing is required. That's the best reason to get the SX which also comes with the telescoping steering.
The engine has more than adequate power and changing oil and filter is a piece of cake, same as the older Sonata (2006-10).