I've owned 3 Subarus in the past ('02 WRX sedan, '05 Legacy sedan and '10 Forester) and we're currently on our 4th and 5th Mazdas in the family (Two 6's, a 3, CX-3, and CX-5).
I've had more recalls on my Mazdas than I ever did on my Subarus for whatever that's worth. That said, my WRX sort of left me stranded once. Two year old factory battery died on me in middle of one of the coldest days in January without warning. Fortunately, I happened to be in the parking lot at Kmart at the time, so I just ran back in the store and got a new battery. Went through two factory batteries on the Legacy too, but at least I wasn't stranded when those both died. The Legacy also had a weird ignition system in it that was either some sort of oddball production thing or the previous owner had converted it. It threw the dealer parts department for a loop and I had to try three different sets of OEM ignition wires before I found a set that worked. Turned out that someone put in a coil and wires from a different model year. The Forester we got rid of because after 96,000 miles it had a severely leaking head gasket, broken welds on the driver seat frame and was due for a bunch of other major service interval stuff that was going to total almost $4500 for everything. We weren't about to spend that much on a 5-6 year old car with about 100,000 miles on it. Quality on their Forester line isn't what it used to be. I know other Forester owners with horror stories of their own.
My Mazdas have all been very reliable runners, but both of the 6's I had ('04 and '05) complained about the cold in the Wisconsin winters. The '04 used to throw check engine lights when it got cold. Overactive knock sensor. The '05 would make weird grinding/crunchy noises when turning the wheel more than 1/2 way to lock in either direction. I never figured out if it was CV joints, power steering, or what was exactly the source of the noise. Only did it when below around 20 degrees F (-7C). The '07 Mazda 3 I had was a terrible winter car. Very big do-not-recommend from me for anywhere that gets snow. It was downright scary to drive in bad weather. It did still get me to work one day after a 10" snowfall and poorly plowed roads. I shouldn't have done it, but it somehow made it through without killing me.
I'm making these all sound to be terrible cars, but really I've had pretty good luck with them and so I keep buying them.
Subaru is losing me as a customer because they're simply charging too much for what they're offering. Subaru seems bent on going to CVT in everything that doesn't have a manual gearbox and that doesn't sit well with me. They're good for fuel economy, but CVT's are not good for people that enjoy driving. If you ask me, Mazda offers more car for the money, even though in the CX-3, the car is physically smaller. The Subarus impressively hold on to resale value like no other car I've ever seen. You pay more for them, but you get more back when it's time to sell. I've had a mixed bag with resale value on my Mazdas.