A shotgun or .38 in an enclosed space will be loud, but if you are like most people it'll sound like a pop gun if you have adrenaline going ... tunnel vision applies to your ears, as well. I can't say what the actual physical effects are. In the instance that I decide I have to shoot someone in my boat interior, potential hearing loss is probably not going to be high on my list of concerns. I do have some minor hearing loss, but that is from a .50 cal machine gun going off in my ear, not handguns or shotguns. The real life shootings I've been around for sounded like cap guns. The .50 was training when I forgot to put in earplugs on a live exercise and felt like someone was hammering my ear with a hammer.
OC spray cleans up pretty easily. It is organic and if water-based (as most are) it will go away mostly through evaporation and a wipe down, with fabric put through a washing machine. I'm not sure what it would take to get it out of foam and you might have to replace anything absorbent that got totally soaked. CS is a chemical compound and would pretty well toast a boat interior. It is also illegal to possess just about anywhere as an individual, so it's unlikely you'd be using it. SWAT teams try not to depoy either sooner than they have to, but OC spray (at least here) is seen as an inconvenience to neighbors whereas deploying CS is seen as we're buyng the house/apartment/whatever. I agree you would not want to deploy OC in a boat interior if you could avoid it unless you had on a protective mask or at least very good eye protection - like you might have for fiberglass work anyway. A damp rag across your nose and mouth will also help. Check out anarchist' protest websites for a score of homemade solutions. OC works primarily by causing swelling in mucous membranes and eyes. It is harder on some people than others and you can build up some limited resistance through exposure. If you were going to try to deploy it in a boat interior I'd think the best strategy would be to back into your forward cabin and deploy it into the main cabin before quickly closing and locking the door and opening the forward hatch if that was an option.
Let's face it, if all hell breaks loose and you really are fighting for your life your best tool is a gun, but I suggest OC as a possible option for those who are maybe not willing or able to carry a gun, but wanting some level of protection. I'd also point out that it is a continuum of force options for sailors just like police - let people see you on the boat, verbally make clear what you want and what you will do if they don't comply, use OC spray if you have it, then use lethal force if you have to. The more of those steps you can point to having used before you finally shot someone, the better your defense will be if you do. The family may claim their son was merely coming aboard to sell you fish or ask for water, but if the people on the shore heard you yelling to get off the boat, stay out of the cabin (maybe even broadcast over a keyed VHF microphone), then he came through a cloud of OC in the cockpit and his shirt is soaked with OC spray where he's lying with bullet holes in his chest on the floor of your cabin with more OC soaked into the salon cushions - it's going to be a tougher sell for them.
I'm not trying to offer any editorializing or value decisions here. I think there are many ramifications from the decision of how you want to live, what hassles you want to deal with, logistics involved, whether an individual can actually make the decision to kill, and whether they can live with having done so. Those are all individual personal decisions. I'm just trying to give practical input on options to consider.
I think someone else has already mentioned this - but the biggest suggestion I would make to anyone is to have a plan and at least walk through it a few times. It's your home, you know the layout, you know where the tools are to defend yourself. Be mentally prepared to do whatever you have to to win and visualize doing so with a clear decision point that triggers the transition for you. That is probably why I use the attempt to enter the cabin. It is a clear threshold, it is your home in any culture, it is at your strongest defensive point tactically.
Just my thoughts.
"You've come to the wrong shop for anarchy ..." ~ Master and Commander