Hi,
'scuse the lurker post - I've been reading these forums for ages but never really posted as I've found all I need in the search
Anyway, can't help noticing your issue sounds similar to my old 92 Legacy 2.2. That would also overheat occasionally, like when overtaking and climbing up hill. Only when it had to work though, I could drive around town all day with no problem.
In the end it turned out to be the heater core. Finally manged to diagnose it by locating the pipes from the engine to the heater core, disconnecting them, and hooking up a hose in a u shape between the engine outlet to the heater core and the return. Drove it like this for a week and the issue went away. Eventually pulled the heater core out (what a pain!) and it was 50% blocked.
Can you do the same on the 2.5 easily? That would be a fairly easy way to rule out your heater core I think.
Cheers,
nub