This is a common issue in speaker design, so there are good references available (look up "baffle step compensation"). Scroll down the HTGuide link to the excerpted figures from Floyd Toole's book, Sound Reproduction. The first pair show what happens when a free-standing speaker design ("full" space) is flush mounted on a wall,
without any changes to accommodate flush mounting. It's not pretty, and it gets worse as you go from flush mount to on-wall mounting to shelf mounting...
http://www.htguide.com/forum/showthread.php?28655-A-Guide-to-HTguide-com-Completed-Speaker-Designs
For an optimized design, the flush mounted speaker would have the same flat frequency response, but at a higher SPL, at teh level of the bass peak shown in fig. 12.8B. That's the great advantage to flush mounting a passive speaker - the freestanding crossover design requires as much as a -6dB hit in sensitivity to achieve flat response, due to low frequencies radiating in all directions. That results in 6dB greater output when the same drivers are flush mounted, using an flush-mount optimized crossover design.
That said, "small bookies sitting on wall mounted shelves" is the worst option shown, due to strong dips in frequency due to out-of-phase rear wall and shelf edge reflections.
And now you know! I can't recommend Toole's book too highly...
HAve fun,
Frank