Place cubed bread on baking trays to dry out for a few hours or overnight. Heat 2 tablespoons olive oil in a skillet over medium heat until hot. Sauté leeks until softened, stirring ocassionally. Add white wine and cook until wine evaporates; remove from heat.
In a large bowl combine bread, leeks, butternut squash, salt, pepper and thyme. Pour ½ of stock over bowl and mix to combine. Continue to add stock until desired consistency is reached.
Preheat oven to 350° F. Oil a 9x13-inch baking dish with the remaining 2 tablespoons olive oil. Add the stuffing to the prepared baking dish, top with shredded gruyere cheese, if using, and bake for 25 to 30 minutes, or until top is starting to brown.