I use 2" thick foam over plywood for my entire layout. It's easy to cut into for depressions in the ground, easy to cut, (a hot iron works well enough, but a jigsaw is easier, faster, and less smelly, I started using a jigsaw after a while with the hot iron, and I've never looked back) and holds track nails well. Shortline railroads can get away with no cork roadbed, but most larger (as in prototype railroads, i.e. UP, BNSF, etc) railroads would have roadbed, at least on the mainline.
Hope this helps!
Thank you so much for your reply, it helped quite a bit.
Thanks you for your reply, excuse the pun, but it put me on the right track.