Preheat the oven to 350°F. Lightly spray an 11x7 baking dish with non-stick cooking spray.
Place potatoes in a large saucepan and fill with water to cover the potatoes by 1 inch. Bring to a boil; add a pinch of salt and cook for 10 minutes, or until potatoes are just fork tender. Using a slotted spoon transfer the potatoes to a colander to drain and set aside. Place the saucepan with its cooking water back on the stove.
Add green beans to the hot water and return to a boil. Cook for 3 minutes, or until crisp-tender. Remove the saucepan from the heat and transfer the green beans to the colander with the potatoes. Discard the cooking water.
Into a small saucepan, over medium heat, add the butter. When the butter is melted, add the onion. Cook for 2 minutes, stirring frequently, until softened. Add the garlic and continue cooking for an additional 30 seconds. Add the flour and whisk until smooth. Stir in the milk, broth, and ground black pepper. Bring to a boil and continue whisking for 2 minutes, until thickened. Set aside.
Return the potatoes and green beans to the large saucepan. Pour the sauce mixture over the vegetables and gently toss to coat. Add the cheddar cheese and toss again to distribute the cheese throughout. Transfer to the prepared baking dish.
Cover and bake for 20 minutes then uncover and continue baking for 15 minutes, until lightly golden and bubbly. Remove the casserole from the oven and let it rest for 20 minutes for the sauce to thicken. Serve hot.