Hi & welcome!
Both cars have their positives and negatives, on paper.
The 2011 (FB engine) has the advantage of no timing belt to change every 100k. It has the MLS head gasket (HG) which goes a long way to solving the Subaru HG problem. It also has the oil filter in the engine bay for ease of maintenance. Against that, the 2011 FB engines were prone to piston ring failure leading to excessive oil consumption E.G. a quart of oil every 1000 miles or so was / is typical in problem engines.
The 2010 (EJ) does have the timing belt that needs replacement every 100k and does not have the MLS HG as standard, so is more prone to HG failure. Ask me how I know

Against that, the 2010 has many of the earlier EJ series problems ironed out and does not have the piston ring / short block issues of the FB series.
If it were me, I'd go for the 2010 BUT I would want to see a full service history. If none available then I'd walk, there are lots for sale - but that's me. Have a full insopection done and look particularly underneath at the HGs - the milegae on the 2010 is typical for when they start to leak. Also be aware
the timing belt should have been replaced by now - more than 105 months since new have elapsed.
Could this be why it is for sale?? If it hasn't been done then insist that it is or use it as a bargaining tool. Figure on $600 in parts for new timing belt kit.