Preheat oven to 375F. Lightly butter a 9-inch square baking dish or pie pan. In the prepared baking dish, stir together the shredded potatoes, butter and salt and pepper to taste. Press the mixture on to the bottom and sides of the baking dish. Bake potato crust in the preheated oven for 25 minutes. While crust is baking heat the oil in a heavy skillet; place breakfast patties and onion in skillet. Cook over medium heat until onion is limp. Drain if needed, crumble the patties, and set mixture aside. In a bowl, beat the eggs with the cheeses. Stir in the sausage-onion mixture, and season to taste with salt and pepper. Pour over the potato mixture. Bake 30 minutes in the preheated oven, or until a toothpick inserted into center of the casserole comes out clean. Let cool for 5 minutes before serving.