Preheat the oven to 375℉ and cut four pieces of heavy-duty foil 12" x 18".
In a small bowl, whisk together black pepper, onion powder, salt, garlic powder, paprika, and rosemary. Set aside.
Lay out 4 pieces of foil on a sheet pan. Evenly divide the potatoes, carrots, and onions among the pieces of foil. Season with half of the prepared seasonings.
In a bowl, add ground beef, egg, garlic, barbecue sauce, and bread crumbs. Mix until just combined, then form four equal-sized patties.
Place the beef patties on the vegetables and season with the remaining seasonings. Place 1 tablespoon of butter on each patty. Seal the foil packets tightly.
Cooking in the Oven: Place them beef side up on a large sheet pan and bake for 40 to 45 minutes on the center rack, or until the potatoes and carrots are tender and the internal temperature of the beef patties reaches 160℉.
Cooking on the Grill: Preheat the grill to 400℉, place the foil packets on the grill over indirect heat for 30 to 40 minutes. Flip the packets halfway through. They will be done when potatoes and carrots are tender, and the internal temperature of the beef patties reaches 160℉.
Cooking Over Campfire Coals: Place the foil packets over gray-white coals and not directly in the fire. Cook for 30-45 minutes, flipping every 5-10 minutes. Cooking times will vary depending on how hot and how many coals you have. They will be done when potatoes and carrots are tender, and the internal temperature of the beef patties reaches 160℉.