Preheat oven to 400 degrees. Toss together squashes, apples, oil, sugar, bacon, and 1/2 teaspoon salt; season with pepper. Spread on a rimmed baking sheet, and roast until golden on bottom, about 50 minutes. Flip squashes and apples over, and roast until tender, about 5 minutes more. Sprinkle thyme over mixture, and serve immediately.