Preheat the oven to 375°F. Lightly grease a baking dish so the casserole releases easily after baking and portions lift out cleanly.
Bring a large pot of salted water to a rolling boil. Cook the macaroni until just al dente so it keeps its structure during baking. Drain thoroughly and set aside.
In a large mixing bowl, combine ground beef, breadcrumbs, milk, eggs, garlic, onion, and Italian seasoning. Mix gently just until combined to avoid compacting the meat.
Press the meatloaf mixture evenly into the prepared baking dish, forming a flat, even layer without packing it too tightly.
Bake the meatloaf layer for about 20 minutes so it sets slightly and can support the mac and cheese layer without mixing.
While the meatloaf bakes, melt butter in a saucepan over medium heat. Whisk in flour and cook for about one minute to remove the raw flour taste.
Slowly whisk in warmed milk, stirring constantly until the sauce thickens and becomes smooth and creamy.
Lower the heat and stir in the shredded cheeses until fully melted. Season lightly with salt and pepper and remove from heat.
Combine the cooked macaroni with the cheese sauce, stirring gently so every piece of pasta is evenly coated.
Remove the baking dish from the oven and carefully spread the mac and cheese evenly over the partially baked meatloaf layer.
Return the casserole to the oven and bake for 20 to 25 minutes, until the top is bubbly and lightly golden.
Let the casserole rest for 10 minutes before serving. This allows the layers to set and makes slicing easier.