Head gasket issues on Subarus are mostly borne by second or later owners. This is one major reason why it's had no effect on new car sales - most new car buyers have sold it before anything happens, and so they have no qualms about buying another one or recommending one to friends.
Overall, Subarus are pretty stout machines. Lots of safety features, great collision protection, good electronics, very nice to drive with careful attention taken to outward visibility and ease of driving, and so on.
I can't speak to the new CVTs, but their older automatics are fantastic - long lived and easy to care for. The AWD systems are reliable and most last the life of the car easily. There were a few hiccups a long time ago with the center diff on the manual-trans AWDs, but that was ages ago and long solved. Hell, even at 430K, the LSD in the Forester's rear diff still hooks up!
But there's a few nagging things that Subaru just can't seem to either solve, or doesn't care to. Year and years of them eat rear wheel bearings. As the "newer" models get some miles on them, we're seeing this still. Ugh. Same for brake calipers. With the exception of high performance models, Subarus have failing brake calipers at a far worse rate than I've seen with any other car. Rear calipers especially. CR reports caliper failure as one of the most common brake service items on all Subarus. My indie tech says they don't bother doing a Subaru brake job anymore without replacing or rebuilding the calipers. But, those things aren't that hard to live with. The expensive engine repair is the big bummer that often sends Subaru owners to other brands.