Heat oven to 400'. Cook bacon in a nonstick skillet until crispy about 5 minutes. Remove and set aside.
Add onions to the pan you cooked the bacon in, along with 1/2 cup of water and cover. Cook stirring occasionally until water has evaporated, about 5 minutes. Uncover and continue to cook until browned, about 5 minutes. Add garlic and 1¼ teaspoon rosemary, cook until fragrant, about 1 minute. Set aside.
Grease 8" square casserole dish with butter. Peel potatoes with a mandolin 1/8" thick. In a large bowl combine potatoes, 1/8 cup of Gruyere, 1/4 cup Parmesan, salt, pepper, and bacon-onion mixture along with 6 tablespoons of the broth. Make sure to separate potatoes if stuck together and coat the potatoes well.
Stack the potatoes on their sides so that the peeled edge is vertical. Make 3 rows of potatoes and they should fit snugly. Pour the rest of the broth over the potatoes. Top with any of the bacon-onion mixture left in the bowl.
Cover the casserole dish tightly with foil and place on a rimmed baking sheet. Baked for 1¼ hours. Uncover and bake until tops of potatoes are golden brown and knife into to potatoes meets with very little resistance, about 30 minutes longer.
Combine the remaining cheeses in a bowl. Remove from oven and sprinkle with the rest of the cheese mixture. Continue to bake until well browned, about 15 minutes.
Remove from the oven. Sprinkle with the remaining 1/4 teaspoon of rosemary. Let cool for 15 minutes and serve.