Buy new. Maintain it. If you're lucky, you'll get the new $7000 engine before the 10/100k warranty expires. If you don't plan on keeping the car past the 60 month car payment, then do the least required maintenance and trade it in.
The 2.0TGDI/2.4GDI has been a nightmare for Hyundai.... numerous engines seized, many turn into oil burners very young in their life, some sludge up even with acceptable maintenance, others run perfectly and then suddenly die, several class action lawsuits, extended warranty(Kia better than Hyundai), .... The YF/LF Sonata forums and earlier SantaFe forums have plenty of info on the engine, as do the similar Kia forums.
I am keeping my theta 2.4GDI until the warranty expires. Before then, the engine will be replaced. Whoever gets it dirt cheap used will have a new or rebuilt engine. My neighbors 2.0T failed at ~60k miles and was maintained pretty well with 4k-5k mile oil changes, usually every 6 months, using name brand synthetic oil and OE filters.
Theta-II.... brought to you by the same engineers that suckered you into an Excel, and nothing has changed. Hyundai spent the last 25 years rebuilding their reputation, producing excellent cars and SUVs, only to create a lemonade making engine for the 2011 Sonata, and then draft it into many Hyundai/Kia products.
Corporate greed alive and well in SouthKorea and they still won't fess up to the real problem with the engine.
Don't worry, the knock sensor can detect engine failure noise prior to the engine seizing. So, when it goes into limp mode, you should still be able to make it home or to the dealer, at a slow relaxed speed.