Preheat oven to 450 degrees F. Coat a large baking sheet with cooking spray.
Peel and cut shallots in half through the root, leaving the root intact. Place the shallots in a medium bowl and toss with 2 teaspoons olive oil, salt, and pepper. Place the shallots, cut side down, on prepared baking sheet and roast until the bottom side of the shallots are deep brown, 15 to 18 minutes.
While the shallots are roasting, pour vegetable or chicken broth into a large skillet. Set over medium-high heat and boil until the chicken broth reduces to ¼ cup, 5 to 6 minutes. Add granulated sugar and balsamic vinegar, bring to a boil, and stir until the sugar is dissolved. Add the roasted shallots to the chicken broth mixture, reduce heat to medium-low, and simmer about 5 minutes, until the sauce coats the shallots. The shallot mixture can be made up to a day ahead, then gently reheated over low heat before serving.
Bring a large pot of salted water to a boil over medium-high heat. Add green beans and cook until the green beans are tender-crisp, about 2 minutes. Drain immediately. Toss the green beans with 2 teaspoons olive oil. Arrange on a serving platter and top with roasted shallots. Serve.