The cabin top and side decks have a plywood core. The liner is just below. Having pulled out port lights and done a few other projects involving this area on my '82 H30, I would estimate there is not much more than 1/8 to 3/8 inch of space between most of the liner and cabin top. Down the center of the cabin top (on my boat anyway) there is no space; the liner seems to be cemented to the deck underside. There is more space, 1 or 2 inches, at the lower edges of the liner under the side decks.
You are not going to get much insulation into the cabin top were you want it and that space is also effectively the wire raceway to your cabin lights. It would be impossible to pull new wiring to them in the future if the space is filled with foam. The larger space at the side decks is where you need to maintain wrench access to the toe rail nuts.
If you are looking to stay cool in the Florida sun, a problem I rather envy right now, the suggestions above from Ian sound more effective, and less problematic, than spray foam above the cabin liner.