Probably a lot...
Depending on the trade terms, the Rams could be on the hook to pay the bulk of his salary.
Remember the Rams were smart to get Bortles as a backup for less than a million because the Jags were on the hook for the rest.
If you can get Goff as a cheap backup and competition to your starter AND maybe draft capital as well. Good move if you can pull off the right terms.
Plus he is young and a proven winner.