How would I make sure that my hamburgers (or any food unsuitable raw) tastes good? With other foods, it is possible to adjust the spice proportions according to taste, but I would not taste the raw meat.
Hamburgers are beef. Buy meat from a source that you trust, and taste them raw :)
EDIT in response to OP comment:
Food borne pathogens can be insidious; cooking them to death is one way to handle them; another way is risk management to avoid bringing them into the kitchen at all.
Pork is traditionally required to be cooked because of Trichinella parasites, although, at least in the US, these are no longer found in commercial pork, and the CDC believes all cases of human trichinosis are due to undercooked wild game.
A more likely danger is food poisoning via human fecal bacteria like salmonella or E. coli O157:H7. There are a few ways to avoid these besides luck. Factory farming practices that involve thousands of caged animals living together and processed at huge slaughterhouses are more likely to lead to contaminated meat than a small farm producing grass-fed or pastured meat. Since these bacteria grow on the surface of meat, they are killed when the surface is cooked and the inside is rare. Unfortunately, the earlier the meat is ground up, the more time any bacteria in minced/ground meat has to reproduce (and in food poisoning, number of bacteria is an important factor). For these reasons, I recommend buying meat from a local small farm source, or, if you want minced/ground meat, buy a complete meat cut and have it ground a short time before you cook it.
I would add that the danger of fecal bacteria contamination from uncooked vegetables is similarly high, but we regard them as safer by habit because traditionally the danger from meat was due to internal parasites, not from fecal bacteria introduced by modern concentrated feedlots. Plant parasites generally can't infect humans, and unlike meat they can usually be scrubbed or peeled.
I think the risk of occasionally tasting raw meat is comparable to eating raw unpeeled vegetables: would you taste spinach, sprouts, green onions to save five minutes? Then you're not going out on a limb by tasting a bit of minced beef or pork :)