Arrange a rack in the middle of the oven and heat the oven to 400°F.
Heat 2 tablespoons of the olive oil in a 12-inch cast-iron or oven-safe straight-sided skillet over medium heat until shimmering. Add 1 finely chopped yellow onion and sauté until softened and translucent, 3 to 4 minutes. Add 1 pound peeled and cut sweet potatoes, ½ teaspoon of the kosher salt, and ¼ teaspoon of the black pepper, and cook, stirring occasionally, until the sweet potatoes are just tender, about 10 minutes. Transfer the mixture to a plate or bowl.
Add the remaining 1 tablespoon of olive oil to the skillet. Add 1 pound quartered cremini mushrooms, remaining ½ teaspoon kosher salt, and remaining ¼ teaspoon black pepper. Cook, stirring occasionally, until just tender, 5 to 7 minutes. Add 2 minced garlic cloves and 1 teaspoon fresh thyme leaves and sauté until fragrant, about 1 minute more.
Sprinkle in 3 tablespoons all-purpose flour and whisk until the flour dissolves. While whisking constantly, slowly add 2 cups low-sodium vegetable broth and whisk until smooth. Bring to a simmer and stir with a wooden spoon until thickened, 8 to 10 minutes.
Remove from heat. Stir in 5 ounces baby kale (about 5 packed cups) a few handfuls at a time until just wilted, 1 to 2 minutes. Stir in ½ cup whole or 2% milk. Return the sweet potato mixture to the skillet and stir to combine.
Unfold the puff pastry and place it over the filling, tucking the excess pastry inside the pan. Use a sharp knife to cut 4 (1-inch) slits in the crust as vents. Bake until the crust is golden-brown, about 20 minutes. Let cool 10 minutes before serving.
