If managing members of a shared mailbox is the only action you need, you can create a custom role using the Exchange RBAC model, and even scope it to specific shared mailbox(es) only. A more generic answer is that there is only limited support for custom roles across Microsoft 365, with only certain object types/operations currently supported. Luckily, the Exchange RBAC model is very robust and can address most requirements with regards to mailboxes.
Read about Exchange RBAC here: https://learn.microsoft.com/en-us/exchange/permissions-exo/permissions-exo