I would buy any mazda over a subaru any day; Let me elaborate a little.
The engineering and quality of mazda vehicles is much better than a lot of cars, including subaru. Also, for what mazda is worth, their cars all have a huge fun factor. Subaru in my opinion is just another car with AWD, nothing spectacular or outstanding in any area, IMO. Buy a mazda, you'll be happy you spent less money on something that gives back 3x its cost in fun and reliability.
For what its worth, my brothers protoge 5 wagon is a slow turd but its such a fun car to drive regardless. Its an 03 with 124,xxx and has had no problems with it, and it runs like a top. I did manage to walk an older 325i Beemer once with it, so its got some balls.