Preheat oven to 450°F.
Toss squash and shallots with 1 tablespoon olive oil, a pinch of salt and pepper and thyme. Spread out in a heavy roasting pan, and roast for 25-30 minutes, stirring occasionally after the first 10 minutes, until squash and shallots are tender and caramelized. Remove from the oven, and discard thyme stems.
While the squash roasts, heat remaining 3 tablespoons olive oil in a large Dutch oven over medium heat. Add pancetta. Cook for 5-7 minutes, until a good portion of the fat is rendered. Add mushrooms to pot, and toss well. Cover and cook for 5 minutes, until mushrooms begin to release their liquid. Uncover and increase heat to medium-high. Add bay leaves, garlic and a pinch of salt and pepper, and continue cooking for 12-15 minutes, stirring frequently, until the liquid has evaporated and the mushrooms are tinged golden-brown.
Stir in broth, scraping up any bits stuck to the bottom of the pot, and bring to a boil. Stir in farro, and bring back to a boil. Reduce heat to medium-low, and simmer for 25-30 minutes, stirring frequently, until all the liquid is gone, and the farro is tender. Stir in squash and shallots, and serve with grated Parmigiano-Reggiano cheese.