In a bowl, combine ground beef, parsley, mustard, flour, egg, 1/2 teaspoon salt, 1/4 teaspoon pepper, and 1/2 cup beef broth. Blend well with a fork.
In a 4- to 5-quart pan over high heat, bring brown onion gravy to a boil; add sherry and reduce heat to maintain a gentle simmer. Quickly shape beef mixture into 1-inch balls and drop into gravy. When all are in, cover and simmer until meatballs are no longer pink in the center (cut to test), 10 to 12 minutes. With a slotted spoon, transfer meatballs (some of the onions will come too) to a bowl.
Boil gravy over high heat, stirring often, until reduced to about 2 cups, 10 to 15 minutes. Season to taste with salt and pepper. Remove from heat and return meatballs and any accumulated juice to gravy; mix gently.
Meanwhile, in a large bowl, with a mixer or potato masher, mash potatoes with 2 to 3 tablespoons butter and the cream cheese until smooth. If desired, add just enough beef broth to moisten potatoes to be able to squeeze them through a pastry bag. Beat in the Gruyère cheese and add salt and pepper to taste.
Butter a shallow 3 1/2- to 4-quart casserole. Spread two-thirds of the potato mixture evenly over bottom and up sides. Spoon meatball-gravy mixture into the center. Spoon remaining potato mixture decoratively around edge of meatball mixture, or spoon it into a pastry bag with a 1-inch star or round tip and pipe around the edge.
Bake pie in a 400° oven until gravy is bubbling and potatoes are browned, 30 to 35 minutes.
Brown onion gravy: Peel and finely chop 2 onions (8 oz. each). In a 4- to 5-quart pan over medium-high heat, stir onions in 2 tablespoons butter until richly browned, 13 to 15 minutes. Add 2 teaspoons sugar and stir for 2 minutes. Add 3 tablespoons all-purpose flour and stir until browned, 1 to 2 minutes. Remove from heat and stir in 3 cups fat-skimmed beef broth. Return to high heat and stir until boiling.