I think you have to think about what you are going to do with the layout. If it is going to be built in place, and never to be moved, then you can't really overbuild it. If you are making a module that needs to be portable to go to shows, then weight is a big factor. As Zedob mentioned, longer spans need more strength than shorter spans. If braced every 12 inches with a 1 x 2 cross member, 1/8 inch luan door skin is very strong. If you try to use it with cross members every 24 inches, it will sag and warp between cross members. Foam is very rigid, but it is difficult to mount undertable switch machines to it. If the foam is glued to plywood, even as thin as 1/8 inch luan, then you can mount switch machines, or other undertable devices directly to it with screws. If you need 2 inches of foam to maintain rigidity then plan on using 2 or three thicknesses of 2 inch foam so that you can carve in gulleys and washes in the top 2 layers without compromising the strength of the 2 inch foam base. A couple of final thoughts on thought on foam, remember that you can't use nails or spikes to hold track on foam. If you are going to use foam, you will need to use glue to mount roadbed and track. Also foam is ver rigid, but it is not very resistant to sharp objects. That factor makes it great for planting trees, not so good for planting elbows, fingers, or even hands if you lean on it!
I noticed from your original post "Need guidance" that you are talking about a 36 inch wide layout. If it is a shelf that is only accessable from one side, you will need places to rest one hand for support while reaching across the layout to rerail equipment on the back of the layout. If you are using foam, and you lean across and try to support your self by putting down a hand to lean on, you will at least put a deep handprint into the layout. I would suggest that pieces of plywood, 1/8 inch is plenty thick if supported by foam, that are about 12 inches square will work to support your weight. You can make them function as bases for structures, or even parking lots. Make the structures removeable, then if you need access, remove the structure, and use the base to lean on. In planning your layout, you need to experiment to see what you can reach one handed and what you will need to rest on one hand to reach the rest of the way across, and plan the necessary support accordingly.