It depends what your idea of fun is. As you say, Croatia has the coastline, and although very scenic, the roads are very full, especially with trucks, and there are long stretches of no overtaking areas. Head inland towards the mountains, and the roads are much quieter and generally in good condition.
I personally prefer Bosnia for the reasons you mention - few tourists, many mountain roads etc., but be careful on those roads - they are not so well maintained as those in Croatia and unexpected slides in corners become the norm. There are many gravel roads to explore - minefields are well-marked and you can be sure of a welcome wherever you go.
So to summarise, for pure riding pleasure, Croatia probably offer more, for the whole experience, Bosnia (These are of course my own personal opinions!).
Viel Spaß und viele Grüße!