If money was all that mattered we'd all be riding Kmart bikes. The dough is an important consideration, but not the only consideration. Since these bikes are not identically spec'd it's a judgement call as to which is the better bike for you. And it's not our judgement that counts, it's yours. You need to get out and ride both bikes. Buy the bike that feels better. You won't appreciate the money you saved going with the less expensive bike if you find your not comfortable on it or it doesn't perform to your expectations. Within ones means, buying a bike is not a financial decision.
Trek has been making the 520 since the eighties. It's the only bike in Trek's line up in 1988 that they continue to manufacture today. They have sold thousands of these bikes. It's low tech, and it's not a show pony, but there's a reason Trek still markets this bike. Something to think about.
The 520 can be bought at a discount to list price. I paid about $1000 for my 04 two years ago and could have gotten it for $900 from another shop. Last year while shopping for another bike I saw an 04 offered for $850 from a reputable shop. The point being that the price difference isn't the $400 being posted. Shop for your best price.
Lastly, is the REI dividend set in stone? The REI store in my area is getting crushed by LL Bean and EMI. The stores are within sight of each other. EMI busy, LL Bean packed, REI is a ghost town. My personal preference is REI, however because of the lack of traffic at the store whenever I'm there I consider the dividend a gift and don't count it into any of my purchasing decisions. Retail is a tough biz, who knows what will happen.