Depends on the meat-grinding process. Is it some large production facility where scraps and sub-standard meat portions are thrown into a vat and ground up, with a lot of opportunity for contamination (eventually being sold in large plastic tubes as cheap frozen ground beef)? Lots of danger there.
Your local butcher shop, done by hand on equipment that is cleaned every day or even between batches? Or done on demand? Much less risk there.
The main worry and danger of ground beef is the fact that usually, with a cut of meat, the outer surface might be at risk for some bacterial contamination. As you get a lot of cuts/scraps, that's a lot of "surface area," which then gets ground and mixed, as opposed to a solid slab of beef, where the vast majority of the interior of the meat isn't exposed.
So, if I take a big chunk of chuck roast, cut it into smaller chunks and immediately grind it, myself, in my kitchen, the bacterial risk isn't going to be that much different than that of the chuck roast, itself, if my equipment is cleaned using appropriate methods for keeping kitchen equipment bacteria-free.
By the way, if your burger is pink in the middle, that's probably medium, not rare.