Preheat the oven to 400˚F.
In a Dutch oven or other large, heavy-bottomed pot, warm the olive oil and add the diced onion. Sauté until softened, about 5 minutes. Add the garlic, and cook another minute until fragrant.
Stir in the diced tomatoes, all of the rosemary except 1 tablespoon, and all of the oregano. Simmer for 3 - 4 minutes to meld the flavors. The sauce will slightly thicken.
Add the beans, crushed red pepper, salt, pepper, one-quarter of the fontina cheese, and half of the Parmesan cheese. Stir to combine, and dump into a baking dish.
Top with the remaining Parmesan and fontina cheeses, and slide into the oven. Bake for 15 minutes, until the cheese is completely melted and turns a golden color.
Sprinkle with the remaining rosemary before serving. Serve warm.