This upgrade may be possible; however, you need to check with the motherboard manufacture what processors have been certified as fully compatible.
Both processors are great but the most important think here is to check with the motherboard manufacture.
I did go to the motherboard manufacturer. They were able to tell me that it is a proprietary one build for HP (it is in fact in an HP PC) but not if any other CPU will work or not. I had hoped to at least be able to get a pin out of the two CPU’s from Intel here that would show me if it was impossible so I could forget it or if the pin out is a match to just plug in and see what happened.
The Pentium D used a completely different internal architecture than the Core 2 Quad. They also required completely different chipsets so It is very unlikely that this would work.