What benefit are opto-couplers for relay switching providing, if both sides share the same ground?
I think it's redundant. That said, I have heard from someone of experience on SE that although relays provide galvanic isolation, they can't be relied upon to prevent arcs from jumping from the primary contacts to the coil.

I've run into more than one newbies online where they are using a relay to switch a large motor (always an AC motor if I remember correctly) and every time it switches (both on and off) it causes their processor to reset. It's a seemingly unsolvable problem that I can only attribute to the above thus far, but I never hear more experienced people having the same problem nor do I hear them talking about using optos with relays.

However, an opto whose output is not isolated from its input side (as yours is), would not help. Your 5V is probably not non-galvanically isolated from your 3.3V supply and it needs to be for the opto do provide any protection.

Now that I think about it, the focus of the help was always on flyback diodes or RC snubbers across the relay coil and decoupling capacitors, none of which helped. An AC motor would preclude from using flyback diodes across the motor itself (unless they were bidirectional TVS diodes) which is why it was never suggested (and unnecessary if the relay was as isolated as we assumed it to be). However, placing a small RC snubber across the motor itself was never suggested either which should solve the issue if an arc jumping from primary contact to coil is the problem.