Jack, for your shelf you get the stiffness from having the two layers of laminate separated by a spacer (some form of core material, or the side walls if you do a hollow stringer). With the typical U-channel stiffener, one layer would be the deck, the other the bottom of the U.
Looking at the geometry, if you squeeze the boat at the deck level, the deck would normally flex upward. Any beam you add below deck would then be loaded on compression. (The reverse is true if you stand on deck, but that's not what you are aiming for).
The advantage of carbon is its tensile strength. That wouldn't come into play here because it would be the original deck that's under tension when you squeeze the boat.
Other than weight, I'd expect that you wouldn't see much difference whether you use carbon or glass, when the loads are like that. You could even use bamboo, it's pretty strong under compression - after all they do use it in Asia to build scaffolding around buildings. Split lengthwise, epoxy sealed and held in place with glass tabs along the edges, I would think it should be just about as strong and bit lighter than a beam laminated from glass.
However, you are right, my suggestion had not been for that purpose, but for a deck support post (not beam) if one were to replace the bulkhead.
I've actually experimented with bamboo a bit for a spinnaker pole. I did add one layer of glass tape and the pole is lighter and to all appearances as strong as a similar sized aluminum one which I own, which was reinforced by inserting one aluminum tube inside another. (Both poles have an effective 1" ID to accept the usual fittings). Now that bamboo pole would not be class legal, but not my concern, as our races here are, well, more free-form.
I did get a good bit of good-natured ribbing when I first showed up with it, but I like it, and it works (and it's a steal compared to aluminum).
Here are some pictures (no, that's not my pole
)