Preheat the oven to 375°F. Lightly grease a baking dish so the casserole releases easily after baking.
Bring a large pot of salted water to a boil. Cook the macaroni until just al dente so it does not become mushy when baked later. Drain and set aside.
In a large bowl, combine ground beef, breadcrumbs, milk, eggs, garlic, onion, and Italian seasoning. Mix gently just until combined to keep the meatloaf tender.
Press the meatloaf mixture evenly into the bottom of the prepared baking dish. Do not pack it too tightly.
Bake the meatloaf layer for 20 minutes so it sets slightly and holds its shape in the casserole.
While the meatloaf bakes, melt butter in a saucepan over medium heat. Whisk in flour and cook briefly to form a smooth base.
Slowly whisk in warmed milk, continuing to stir until the sauce thickens and becomes smooth.
Reduce heat and stir in shredded cheeses until fully melted and creamy. Season lightly with salt and pepper.
Combine the cooked macaroni with the cheese sauce, stirring gently until all pasta is coated evenly.
Remove the baking dish from the oven and carefully spread the mac and cheese layer over the partially baked meatloaf.
Return the dish to the oven and bake for an additional 20 to 25 minutes, until the top is bubbly and lightly golden.
Allow the casserole to rest for 10 minutes before serving so the layers set and portions hold together.