You can find good information about train schedules anywhere in Europe on the German Rail website, bahn.de. Look for information in English, if needed.
Entering Munich-Pula, just that simple, yields the information that an overnight sleeper operates into the Slovenian capital, with 2 changes of train after that to Pula, Croatia. What could be simpler? Apparently no need to go to Zagreb.
Consulting the maninseat61 website can be of help on other logistics, such as obtaining tickets.