Been to both. Dubrovnik was excellent, (depending on what you want of course). I found it cost as much, sometimes a little more, than the UK. We went to Montenegro and Bosnia on day trips, all very good. beaches are not very good, stones, and shingle. People are friendly enough. Overall, well worth a visit.
Malta was very disappointing. Beaches were almost non-existent, the food was pretty average, (national dish is rabbit stew !), and not too many tours to go on. although the island next door, (forget its name, was ok for a day trip. We were at each for at least 12 days, and I would say by the last day, both were getting a little boring.
We aren't beach people, and like to wander around during the day, and go out for a meal at night. If you like staying on the beach, you might have a different view of things.