Set a medium saute pan over medium heat. Add olive oil and bacon and render, stirring often, until crispy, 6 to 8 minutes. Add onions and cook until lightly caramelized, 4 to 5 minutes. Season with salt and pepper. Add butter, garlic, and apple and cook, stirring often, until apple is tender, about 5 minutes. Add squash and increase heat to medium-high. Cook squash, undisturbed, for 3 to 4 minutes, until beginning to brown. Stir, then add nutmeg and thyme and season with more salt and pepper. Cook for another 3 to 4 minutes and add maple syrup and stock. Bring to a boil, cover pan, and reduce heat to medium. Cook until squash is tender and most liquid has evaporated, about 15 minutes. Remove lid, stir squash gently, and season again if necessary. Serve immediately.