I would go Accord all day long over the Subie Legacy. They stopped AFAIK production of the Legacy Spec.B which was pretty much the only interesting model from the Legacy lineup.
My previous car was a 2009 Accord Coupe with the V6 6-speed pairing. Phenomenal.
Since you're looking at the 4 cylinder engines, the 2.5 from subaru is good, but gets a little lost in the heavy car + AWD. The 2.4L K24 from Honda is a fantastic engine as well, and does wonders to move the heavy Accord.
I cant comment on the automatic transmissions of either other than to say if you go Honda and get a V6 Auto, BE SURE TO GET A TRANSMISSION COOLER.