Bring a pot of lightly salted water to a boil; prepare a bowl of ice water.
Cut the green beans in half if you like the pieces a little smaller. Blanch the green beans by dropping them into the boiling water and cooking them for about 1 1/2 minutes. Remove from the boiling water with a slotted spoon and immediately plunge them into the ice water to stop the cooking process. Drain the beans once they're cool and set aside.
Preheat the oven to 350 degrees F. Butter a casserole dish.
Add the bacon pieces to a skillet over medium heat. Cook for 2 minutes, then add the garlic and onion and continue cooking until the bacon is done (but not crisp) and the onions are golden brown, 4 to 5 minutes. Remove from the skillet and set aside.
In the same skillet, melt the butter over medium heat. Sprinkle the flour into the skillet and whisk immediately to evenly mix it into the butter. Cook for a minute or two, then stir in the milk, half-and-half, chicken broth and sherry. Cook, whisking constantly, until the sauce thickens, about 2 minutes. Add the cayenne, 1 1/2 teaspoons salt and some pepper, then the grated Cheddar and Monterey Jack. Stir until the cheese melts. If the sauce is too thick, splash in some chicken broth as needed. Add the peppers along with the reserved bacon/onion mixture and stir to combine.
Put the green beans in the prepared casserole dish. Pour the sauce over the green beans and stir gently to combine. Bake until the sauce is bubbly, about 30 minutes. Top with the Onion Strings.
Put the onion slices in a baking dish, cover with the buttermilk and soak for at least 1 hour.
Heat the oil in a Dutch oven or heavy-bottomed pot until a deep-frying thermometer registers 375 degrees F.
Combine the flour, salt, cayenne and some black pepper in a bowl. Grab a handful of the onions, throw them into the flour mixture, tap to shake off the excess and plunge into the hot oil. Fry until golden brown, a few minutes, then remove immediately to a paper towel-lined plate. Repeat until all the onions are cooked.