This is really confusing to me. What does splitting to multi repo have to do with this? Did the split make you have multi language? Whether it was mono or multi, wouldn’t you still have this issue?
Regardless, why didn’t you take the dependency and stand it up as a service with an API. Then any other service could call it to use it. You wouldn’t need to have Java code use Perl code. You would have Java code call an API. The fact that the endpoint was written in Perl would be an implementation detail.