Echoing the above, which is that you need to decide how much you like the car, along with what putting $5-7k into it will get you for reliability versus other options, such as taking on a car loan or buying a used car with that same money.
How solid is the car other than the motor situation?
I'm just digging out of a similar hole myself, where I picked up an '08 Legacy GT, only to need a new short block after a few months of owning it. Since the car was otherwise in great condition, I decided to spend the money.
All said and done, your estimate of $8k was spot on for me, although that included a built short block with forged pistons, IAG air oil separator, rebuilt heads, VF52, catted downpipe, tune, incidentals, and shop labor.
Either way, good luck with the decision!