Yes, the engines for all versions of the DB7 that I am aware of so far were different from the engines in the XK8-XKR (X100 Jag), however the platform was the same.
The DB7 i6 came several years before the XK8, around 1994 (and I say XK8), so the early models were not very well built. I believe the DB7 itself was based on Jag concept cars, XJ 41 coupe and the XJ 42 convertible, off the top of my head.
The XJ 41 and XJ 42 were supposed to be Jag GT cars that would go in the bracket under the XJ220 supercar, and replace the aging XJS/XJS V12 while using the same steel chassis (My guess is tight budget). The XJ41-42 developed ~late 80s/early90s, used an AJ6 unit and went though several iterations before the project was abandoned. I believe the XJ41/42 were never produced/ or produced one off, however these two cars ARE the missing link between the XJS and the DB7/first generation XKs produced in the early-mid 90s.
Now the DB7 was to be slotted under the Virage V8 (which was expensive), so they used the less powerful and the existing AJ6 to power the DB7 (the engine comes out of the XJS-6), along with the upgrades mentioned above, most notably a roots supercharger... The car had performance slightly below the Virage, while it seemed like a significant advancement from the XJS (at least on the exterior).
The XK 8 came later, 1997. It was based off the same 41-42 concepts mentioned previously, and was to be slotted under the DB7... The AJ26 V8 engine used in the car was brand new, it was slightly less powerful than the unit on the DB7 (for a reason explained below), and naturally aspirated for 1-2 years (for which the DB7 i6 remained on sale).
Now I would like you to take a look at the two companies simultaneously...
The supercharged version (or the XKR ) featuring the 370 BHP
did not come out until Aston prototypes using the cosworth SG V12 engine were being tested.In 1999, the year (or the year after) when the first XKR just was released, the DB7 Vantage with a significantly more powerful V12 was also released to replace the DB7i6.
Interestingly enough, the V8 of the Jag was not stroked up from 4 liters to 4.2 liters until 2003, when Aston had the DB9 well on the way to replace the DB7... So the XKR that had almost the same outputs as the DB7 Vantage (the AJ34S supercharged, 390 BHP, 400 LB-ft) came out just as the Vantage was being phased out.
So,in conclusion these cars do share a lot of the chassis and body structure (as they are coming from the same concept car)... but not the engines...
The DB7 i6 is the most related to the XJS, since it was released first...
The XK8 (original) was less potent than the DB7, but was a more practical car, in part due to an all new engine, better budget (?), and experience.
The first, 4.0 L XKR did dwarf the DB7 i6 in most aspects... however it should only be compared to the Vantage DB7, which overall was a much more potent car...
The second 4.2 L XKR still had performance a bit below that of the DB7 Vantage and GT, however the 7 was to be phased out soon. The XK8 with 4.2 liters would have no problem debuting in 2003 also (because the i6 DB7 was not in production anymore)
There is some information that is old, perhaps some that is new. Hope this helps. Dont forget to cross reference this post
(Edit):
I have also noticed that on several accounts, tuners such as BBR claimed to raise the output of the DB7 i6 (specifically the i6) into high 300-low 400 bhp by simply tweaking the supercharger and an ECU remap (for a price of just several thousand dollars)...
As i see it, the DB7 was detuned due to fear that it would cannibalise Virage/ Vantage sales in the 90s...
I am not exactly sure of this connection, and if I may, I would like to ask you to verify/deny this