Preheat your oven to 375°F (190°C). Lightly grease a 9×13 inch glass baking dish.
Heat the olive oil in a large skillet over medium-high heat. Add the ground beef and cook, breaking it up with a spoon, until fully browned. Drain off any excess fat.
Add the chopped onion to the skillet with the browned beef and cook until softened, about 5 minutes. Stir in the minced garlic and cook for another minute until fragrant.
Reduce the heat to low. Stir in the can of cream of mushroom soup and milk until well combined and smooth.
Add the drained green beans (or blanched broccoli florets if using) to the skillet and mix well, ensuring they are evenly coated in the creamy beef mixture. Season with salt and freshly ground black pepper to taste.
Pour the entire mixture into your prepared baking dish, spreading it evenly.
Sprinkle the shredded sharp cheddar cheese and Monterey Jack cheese evenly over the top of the casserole.
Bake for 20-25 minutes, or until the casserole is bubbly around the edges and the cheese topping is melted and golden brown. For extra browning, you can place it under the broiler for 1-2 minutes at the very end, watching carefully to prevent burning.
Remove from the oven and let rest for 5-10 minutes before serving. This allows the casserole to set slightly and makes for easier serving.