if the engine doesn't matter go with lower miles and newer. all things otherwise considered equal, of course, because other factors like paint or irritating noises can rule out one or both, then you would have to keep looking.
@OP you need to determine just how badly you want that bigger engine. If you want it bad enough to justify the cost, get that (or keep looking for a better deal).
When I was shopping around, I wanted something with ~300hp - comparable to my g37, more or less. Sure more power would be nice, but that comes with added fuel costs, more maintenance, possibly higher insurance.
One of the selling points for me on the 2.5 was the dual injection system - both port and direct. That eliminate have to clean valves periodically. Also, I don't drive much (2 yr old car with ~9700 miles now). And when I do drive, i'm stuck in this ghetto called IL, so it's lots of lights and go nowhere fast scenarios. I don't get off on speed like I used to. If I still want something fast, I'll get a motorcycle some day.