I used 10mm MDF for my the baseboards on my new layout. It's bog-standard grade from my local building suppliers but I find it fine so far. I used 18mm ply for the last layout
but it was normal "B&Q" grade so it was less than satisfactory for many of the reasons already mentioned. I looked into birch ply but, as was said, it was too expensive. I also had a few issues with the ply warping because of the temperature changes in my attic. It wasn't too severe but it caused some problems where baseboards butted against each other.
Another thing is that you will seldom get any plywood sheets from a supplier that don't have some distortion, usually from poor storage. The likes of Woodies and B&Q are even worse!
The new baseboards are supported on a frame of 2X1 softwood. Sounds a bit lightweight, but this frame is itself supported by the rafters in my attic so it is more than rigid enough. Track pins aren't an issue for my as I glue my track. I use clear "No More Nails" for fixing the track to the foam underlay which is itself fixed to the MDF board with the same adhesive.
One more issue which hasn't been mentioned; if you are planning to use point motors you need to give some thought to the thickness of the board. Using a "sandwich" of foam and other materials will make it very difficult to install point motors under the baseboards.