Both of those lenses will have more than exceptional image sensors. What you should be looking at is the "incidentals" that they come with: Button layout, software, High Iso performance, lens choices, High Def recording on the D90. Things like that. EITHER camera with good glass will produce (in theory, taking into account user ability) pictures with excellent image quality. Unless you are doing this work professionally getting either camera to produce GOOD pictures is a safe bet.
If you have 1500 to spend, I would take a look at trying to score a D90 used, and supplementing it with a couple of quality lenses: perhaps a Sigma 24-60 F/2.8 as a general walk around lens, and a used Nikon AF-D 80-200 F/2.8 (for telephoto) or a Tokina 12-24 F/4 (for wide angle).
Personally, I would see about scoring a D300 used (I've seen them as low as 1200 - which is darn close to the cost of a new D90) and the above Sigma 24-60.
On the OTHER hand, you can certainly score a 40D used for cheap and then load up on some nice pieces of glass and other accessories (Speedlite flashes, maybe a tripod of some sort).
So really, the question is, what kind of shooting did you have in mind? I know you might say "whatever tickles my fancy" - but there had to be some photograph in your mind that you wanted to take that prompted this interest in a dSLR.