Heat the oven to 375°F. Line a rimmed baking sheet with parchment paper.
Toss the squash cubes with the olive oil and spread them on the baking sheet. Roast for about 15 minutes, until just tender. Let them cool slightly, then roughly mash about half of the cubes with a fork. Keep the remaining cubes intact.
In a large mixing bowl, combine the ground turkey, grated apple, egg, breadcrumbs, onion, Dijon mustard, thyme, salt, and black pepper. Add the mashed and whole squash. Mix gently until everything is evenly distributed.
Shape the mixture into a compact loaf on the parchment-lined baking sheet. Spread the ketchup over the top.
Bake until the center reaches 165°F on an instant-read thermometer, about 40 to 45 minutes. Rest the meatloaf for 10 minutes before slicing so it holds together.