Hmm... Just a thought, maybe a really lousy idea: How about making a nice, hot (
very hot) bonfire, and then shovel the most contaminated soil a little at a time on top of it, being careful not to put so much at once as to smother the fire. I have no idea what kind of gick that foam is made from, and maybe it would still release nasties, even with a really hot fire. Also, don't know if you can spare the fuel for a big bonfire just for this.
If it was doable and wouldn't contaminate the air too much, it would save you the trouble of taking a load of soil to the landfill, and
if it burned away all the nasty stuff, that would also mean less nasty stuff in the world compared to shoving it in a landfill someplace
Again, maybe a terrible idea. Please don't do it without prior research.