Hi leosille,an impreza can be good engine wise if treated right from the start,regular good oil changes,warmed up cooled down.
And not abused past the limit,people's first mistake is often "oh it's an impreza they can take all the stick in the world"
They can take a hammering but still far from bulletproof!
If you are looking for an impreza then they come in a million shapes and forms.
The ej20 engine (93-05 models) came in loads of forms of internals.in all cases the Sti blocks are stronger and the best being the 01-05 Sti block as these have hypereutectic forged internals as standard and can take upto almost 500bhp out the box,it's the engine I put in mine.
There is a million and one mods to do to an impreza and parts are cheap and two a penny and so easy to come by.
Price wise I sold mine for £6.5k and it actually cost me about 13k to build.
The best impreza IMO is the Sti 03-05 widetrack blobeye.they go for about 8k for a great example,the one to get for sure.
Leave the 2.5 (ej25 on all models 05 onwards) alone for sure unless you want a 5k forged engine straight away,there's not many which haven't gone bang at all,here's the thread on scoobynet about how dreadful they are standard, but once forged a good engine and can easily make 400+ lb/ft of torque with just a simple remap.
http://bbs.scoobynet.com/scoobynet-general-1/828990-2008-2010-2-5ltr-engine-failures.html
Sorry for an essay but any info you need on an impreza just ask :-) lol