Force potatoes through a ricer into a bowl. In a separate bowl, mash squash with a potato masher; stir in potatoes.

Bring 4 tablespoons butter and the cream to a simmer in a small saucepan over medium heat. Add 1/2 teaspoon salt and the nutmeg. Season with pepper. Stir cream mixture and 1/3 cup cheese into potato mixture. Season with salt and pepper, if desired. Spoon into a buttered 10-inch round baking dish.