I am from Pakistan and I have a Croatian temporary residence permit as an Erasmus student.
I want to travel from Zagreb to Romania and Bulgaria for a short visit: do I need a tourist visa in those cases?
As stated in Timatic, the database used by airlines:
Bulgaria:
Visa required, except for Passengers with a residence permit issued by Croatia for a maximum stay of 90 days
Romania
Visa required, except for Passengers with a residence permit issued by Croatia for a maximum stay of 90 days
So no, you do not need visas for these countries. Just present your passport and residence permit card at the border.