The only thing they have in common is that they come in aerosol cans and shoot pretty far.
Bear Spray is a non-toxic irritant. The active ingredient in bear spray is oleoresin of capsicum which are the oils in chiles that make them hot.
Wasp spray is toxic to insects but may not be an irritant. The active ingredient in wasp spray are pyrethroids, which attack the central nervous system of insects.
Would you use bear spray on wasps?