Hi, @TomCruise-7376
From your description, I understand that you are experiencing an error when sending an email to a shared mailbox that was created directly in EOL/M365 without an AD object.
After reviewing your error code, there is a problem with the mail routing.
You can troubleshoot in order:
1.Create a send connector to send to the internet. More information can be found Exchange - Error 'A matching connector cannot be found to route the external recipient' | PeteNetLive
2.Make sure that your DNS records (autodiscover, MX records, and so on) are set up correctly and point to the correct environment.
3.Verify that the hybrid configuration and connector are set up correctly to route email to Exchange Online. This includes ensuring that:
-The send connector in Exchange on-premises is correctly configured to route mail to Exchange Online.
-The connector in Exchange Online is set up to accept mail from Exchange on-premises.
4.You can try adding the secondary SMTP address (sharedmailbox@ourtenant.mail.onmicrosoft.com) to your shared mailbox in EOL. You mentioned you tried this, but make sure that the primary SMTP address remains as sharedmailbox@ourcustomdomain.com and that the ourtenant.mail.onmicrosoft.com address is added as an alias.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".