Place potatoes, turnips and thyme in a large pot. Cover with lightly salted water and bring to a boil. Cook, uncovered, over medium-high heat, until the vegetables are tender, 20 to 25 minutes. Drain, reserving the cooking liquid. Place the potatoes and turnips in a large bowl; discard thyme sprig, if using. Mash with a potato masher, adding a little cooking water, if needed, to achieve the desired consistency. Stir in 2 teaspoons oil and cheese, if using. Season with salt and pepper. To keep warm, set the bowl over simmering water and cover with parchment paper or foil.
Meanwhile, heat the remaining 2 teaspoons oil in a large cast-iron or nonstick skillet over medium-high heat. Add onions and cook, stirring often, until golden and very tender, 10 to 15 minutes. Remove from heat.
Bring a large pot of lightly salted water to a boil. Add broccoli rabe and cook until tender, 5 to 8 minutes. Drain and add to the onions; toss to mix.
To serve, mound the mashed vegetables in a bowl or onto individual plates and top with the onions and broccoli rabe.