The shadow is cast by the other side of the cube. Obviously this doesn't make sense in the real world, but there's a reason why it happens here. The cube is very thin compared to the distance (it's 1 metre thick but it's about 20 km away from the camera). It's only a problem with displaceable objects. With a non-displaceable object this wouldn't matter, but Terragen makes some simplifications when it casts shadows from displaceable surfaces onto other displaceable surfaces and it needs to add some bias to the ray positions to make it look correct in most cases. This is one case where it fails.
There are a few ways you can fix this. You could make the cube thicker, or you could replace it with a Plane object. You might also be able fix it by using a higher micropoly detail or higher ray detail multiplier.