Heat 2 tablespoons olive oil in a large, oven-safe pot over medium-high heat. Add the sliced onions and cook, stirring occasionally, until they begin to soften, about 5-7 minutes. Reduce the heat to medium-low and continue cooking, stirring every 3-5 minutes, until the onions are deeply caramelized and golden brown, about 15-25 minutes.
Once the onions are caramelized, add 2 tablespoons butter and 1 tablespoon minced garlic. Cook for 2 minutes, until the butter has melted and the garlic is fragrant.
Pour in 8 cups beef broth and 1/4 cup dry sherry (if using). Season with 1 teaspoon dried thyme, 1 teaspoon salt, and 1/2 teaspoon black pepper. Bring the mixture to a simmer over medium-low heat and let it simmer for 10 minutes.
While the mixture is simmering, preheat your oven to 350°F (175°C).
Add 12 ounces rigatoni to the pot and let it simmer for an additional 10 minutes, stirring occasionally to ensure the pasta cooks evenly.
After the pasta has cooked, remove the pot from heat. Evenly distribute 3 cups garlic croutons over the top of the pasta, pressing them gently into the casserole. Sprinkle 2 cups shredded gruyere cheese (or provolone) over the crouton layer.
Transfer the pot to the preheated oven. Bake for 20 minutes, or until the cheese is bubbly and golden brown on top.
Remove the casserole from the oven and let it rest for 5 minutes before serving.
Notes
If you don't have an oven-safe pot don't worry! You can still make this dish by preparing the pasta as directed and then transferring it to a 9x13 pan. Top with the croutons and cheese and then bake as directed.