When I have to affix something to a surface, I find some way to brace it or temporarily hold it into position. Sometimes I put a small spot of hot glue or wedge 1 x 1" material to jamb the part in place. I've temporarily hot-glued cardboard
cleats to hold the part in position. In your case, you might be able to hot-glue a couple of cardboard chunks for the shelf to sit on while you use a bit of epoxy putty to holed the foam spacer and shelf in place. Once epoxy cures, remove the cardboard.
Don't use hot glue if you will be unable to scrape/sand all traces away and it doesn't take much to hold stuff in place. If you used just a little bit and it didn't smear, you can leave it alone and bury int in your layers of epoxy/glass
I've even temporarily glassed blocks of
wood and used those to screw sticks/wedges to so they could hold the shelf or whatever in place.
Once the part is temporarily fixed in position, I use a small strips of chopped strand mat (CSM) in a few places, usually three spots with polyester resin with 2% or 4% catalyst so it goes off quickly.
Once cured, I remove the temporary bracing ( 4 1/2" angle grinder with 36 grit disk), run fillets of epoxy to from round curves and let cure over night. The next day, I grind away the polyester/CSM tabbing or remove the couple of spots of hot glue (the epoxy fillets usually are enough to continue holding the part, then continue with the epoxy
layup.
No need for the 1 x 3 cleat is the shelf is not to be removable, just glass it in place with the recommended 1/2" or 3/4" foam spacers
If this is a wet
environment, you might consider making a fiberglass panel instead of using plywood for the shelf. Unless the panel has
core, it'll be pretty flexible, but you can stiffen it with formed "floor joists" on the underside (see attached diagram).
Lay up 3 layers of 1708 with polyester resin. On the underside, take strips of cardboard and from a triangular shape (base of triangle against the fiberglass panel and apex pointing down. This is the form for the stiffeners. Don't make it too pointy, you are going to lay CSM over this shape and adhere it to the underside of the panel. Don't worry about the CSM not adhering to or forming perfectly on the cardboard, you are just using the cardboard to form a shape to resist flexing (think I-Beam).
Depending on how big this shelf is, you might need to run 2 or 4 of these. Once resin (polyester) cures, you'll have stiff, lightweight, non-rotting panel that you an cut into the shape to fit the bow area. While designing this, plan for
battery tied downs so you can secure the
battery. Incorporate those tied downs into the lay up of this panel. Maybe thicken the edge area, cut a slot so you can run webbing through it, if you will use webbing to secure the battery.
One can also thicken some
parts of the shelf and drill a hole. Use long bolts (vertical) and a
wood (or DYI fiberglass) batten (horizontal) to clamp the battery down to the shelf with the long bolts.
Jedi's superglue idea is a good idea too.