They don't have to pay his $15M, but all the bonuses accelerate onto the cap for this year.
Before trading him, Carson Wentz cost $34.6M against the Eagles 2021 cap (salary and bonuses)
After trading him, Carson Wentz costs $33.8M against the Eagles 2021 cap (bonuses)