Cook the onions slowly in the butter and oil for 30 minutes, stirring occasionally. They should caramelize. Add flour and stir, cooking for two more minutes. Add milk and cream and cook another two minutes. Remove from heat.
Beat the eggs in a bowl, adding nutmeg and salt and pepper. Stir in the onion mixture and pour the resulting mixture into the pie shell. Bake at 400° F for 25 minutes.