If you put the same amount of money, or even the same exact mods on an STi and a WRX, the STi would win.
Put a the same turbo on each car, same intercooler, same engine mangement (although the STi already has bigger injectors), same exhaust, and other supporting mods, and the STi will win. That extra .5L makes a big difference.
The STi drivetrain is the main thing I like about it. It's easy enough to make an engine put out more power. It's considerably more difficult to make sure something isn't going to break in the process. I have never heard of anyone breaking the STi transmission.
Plus, the STi has a better suspension from the factory. It also has better wheels and tires. I hate the STi seats, but that is something I think I could get used to if I had to.
The STi is probably the closest thing to being race-ready you can buy for under $100k. At the last three autocrosses here, a bone stock STi has won. It also outruns most all other cars at the drag strip. The only ones that beat it have twice as many cylinders.