Either the cork or foam roadbed is a method of simulating the roadbed on most mainline railroads. If you were to do the roadbed with scale ballast it would require a lot of ballast and work. I have used several types of adhesive to attach the roadbed to foam insulation board. Liquid nails, carpenters glue, white glue. The current thinking here on The Gauge seems to favor tub and tile adhesive although I personally haven't tried it. Whatever you use, it should not be something that will eat up the foam. That is, not solvent based.
CSX: I guess you could paint the black foam if you so desired. There again, no solvent based paints. A lot of sidings and yards don't need roadbed. Just lay your track directly on the foam base. This will require a ramp from mainline level to the yard or siding.
It's your railroad. I personally favor ballast, even though its a pain in butt to do.