In a heavy kettle cook the onions, the leeks, and the shallots in the butter with salt and pepper to taste, covered, over moderate heat, stirring occasionally, for 10 minutes, reduce the heat to moderately low, and cook the vegetables, stirring occasionally, for 10 to 20 minutes more, or until they are soft. Remove the lid and cook the mixture over moderate heat, stirring, for 3 to 5 minutes more, or until the excess liquid is evaporated. The onion mixture may be made 2 days in advance and kept covered and chilled.
Preheat the oven to 375 degrees. Transfer the onion mixture to a 2 quart shallow baking dish and stir in the cream. In a small bowl toss together the bread crumbs and the Cheddar, sprinkle mixture evenly onto the onion mixture, and dust it with the paprika. Bake the onion mixture in the middle of the oven for 20 to 30 minutes, or until the cheese is melted and the mixture is bubbly.