I think it depends on the flow direction.
A bubble coral can send out relatively long sweeper tentacles. If the pink pearl is downstream of the bubble coral, then it might get stung, but if it is upstream, then it might be fine.
To be safe, it is better to move them farther apart, but I understand that space can be limited.