I believe the deck joint is a "shoebox", eg the deck fits over the edge of the hull. What you see is the edge that has gotten damaged somehow, maybe ice, but I'm thinking it got repeatedly bashed at one point in time. It looks bad enough to cause leaks, possibly into the deck core. Your stemhead is mostly tied to the hull, not the deck, so I would think it's probably safe enough to sail until you can fix it.
Unfortunately, in order to fix it properly, you are going to have to take off the stemhead and anchor roller, which means contorting in your tiny anchor locker. Once that's done, the fix is easy enough, grind off all the damaged glass, reglass it, then paint or gelcoat to make it pretty again.