Hello IJR,
although I am not familiar with the structural behavior of buildings I cannot help but shearing some thoughts that I have had on occasions when dealing with similar problems when dealing with embedded structures, as tunnels for example.
Building codes (as I know for Greece and some other countries) deal with providing a surface acceleration together with some factors to enhance or diminue it according to the depth of foundation, quality of the soil, percentage of the structure ability to deform plastically etc. This acceleration is used at the base of the building. Starting from the base the building can vibrate free and therefore subjected to deformations.
The case with partial or total embeddement of the structure is a bit difference. In this case if the soil moves so does the structure as a whole and at the limit there would be no deformations expected to the structure. This is more true as the wave propagation velocity in the soil/rock becomes higher.
What is of major importance is the distribution of the wave motion and not an acceleration. It is the difference of movement in the various levels in the soil that will couse problems to any embedded structure, apart from the influence of any ovelying surface building. Also due to the dumping ability of the soil usually only the first and second vibration modes play a significant role.
So, I think, that the piles will be subjected to the wave motion field assumed up to the base of the building with additional shear stresses at the connecting points. The forced vibration of the piles cannot be different from that of the soil, as you also point out, the piles cannot change the soil response.
Now, what is the distribution of the motion in the soil, I think it is not a simple matter. I have seen structural studies starting with a rock level they consider motionless and solve the problem upwards, but I haven;t been able to understand how in this case there is an earthquake if the rock doesn;t move (apart from any Rayleigh waves etc. of course).
Sorry, if I have been too simple in my reasoning and perhaphs these points have been solved already.
Regards