Hi I am doing a weekly meal prep cooking myself, and was wondering if it's ok to grill steaks medium rare and then put them in the fridge to eat in the next 2-3 days, or bacteria can still develop for that time.
That will work just fine as long as they are handled safely before you cook them, then chilled down as quickly as possible after you cook them. I would let them cool briefly after cooking (a couple of minutes), place them in a zip type bag, and put them in an ice bath until chilled, then refrigerate.
Most pathogens (bacteria and the like) that would cause food-borne illness are found on the surface of beef. Some meats (notoriously chicken) are contaminated throughout. But, generally, the vast majority of pathogens from beef are found on it's surface, and tend not to migrate too much into the interior (unless something very unusual happens - like treating the meat with enzymes that destroy connective tissue - like papain. Citation) BTW, this is not an industry standard (that I know of). But, if you use "meat tenderizer", don't use it days in advance. *
(I've spoilered the following discussion of slaughtering processes for the squeamish.)
Generally speaking, the pathogens are found on the outside of and in the digestive tracts of the un-slaughtered animals. During the preparation of smaller cuts of meat, some of the pathogens are transferred onto the consumer cuts through the blades, or, well, splashing.
What this means is that cooking your beef will likely kill the vast majority of the surface bacteria (which likely make up the vast majority of all bacteria in the meat), making the meat safe to eat. It's not a total removal of bacteria, but you can think of it as "resetting" the safety clock for time in the fridge.
I've certainly eaten left over steak that was cooked a few days previously. It works great as a repurposing, e.g. making a stir-fry. I have never had a great experience reheating it as steak and expecting it to be as tasty as when it was first cooked.
So, to answer your question, I think you could safely do what you suggest. Whether you should do it depends on your personal tastes.
* If you even use 'meat tenderizer'.