Preheat oven to 400F degrees. Line a rimmed baking sheet with foil. Grease shallow 2-quart oval baking dish or a 11x13 glass rectangle dish. Set aside.
In a large bowl, combine Cheddar and Pepper Jack cheeses; transfer about 1 cup to a small bowl and set aside for topping later. To the large bowl with cheeses, add the heavy cream, minced garlic, rosemary, salt , and black pepper, stir lightly.
8 ounces shredded extra-sharp Cheddar cheese, 8 ounces shredded pepper jack cheese, 1 ½ cup heavy cream, 6 cloves garlic,, 1 Tablespoon fresh rosemary leaves,, 1 ¼ teaspoon salt, ¼ teaspoon fresh ground black pepper
Very thinly slice the peeled potatoes; place in bowl with the cream and cheese mixture. With hands or large spoon, toss until all slices are well coated, you may prefer using your hands. Arrange slices in baking dish, sides facing up. If using oval bowl, arrange slices around outer edge and then fill center. If using 11-x13-inch rectangle, arrange slices in rows. After all potato slices are arranged, place onion slices intermittently throughout the potatoes.
4 ½ pounds russet potatoes,, 1 small onion,
Cover baking dish tightly with foil, place on lined baking sheet and bake for 30 minutes. Remove foil, bake for additional 30 minutes. Sprinkle reserved cheese over top of potatoes, adding extra if you like. Bake for the final 30 minutes, until the cheese is melted and the edges of the potatoes are golden and crisp. Check potatoes with a fork and if needed, tent foil back on dish and turn off oven. Let potatoes remain and continue to soften in the warm oven for up to 20 minutes more.
Sprinkle with extra rosemary if desired and serve.