Buying a used Subaru Forester or Outback - which years are best?

If you want a really reliable Subaru with a bullet-proof engine, look for an Outback with a 6-cylinder engine.

First of all, this engine uses a timing chain, so there is no timing belt to worry about.
The 6-cylinder engines have no known issues, and I have been driving one since December, 2001 with only one repair, namely replacement of the tensioner and the idler pulley for the serpentine belt. The bearings in those pulleys were going dry. Other than that minor repair–no issues whatsoever in 8+ years/100k+ miles.