Set a spaghetti pot half filled with well-salted water on the stove to boil.
Heat the olive oil over medium heat in a deep 12-inch frying pan that has a lid (which you'll use later). Add the garlic, shallot and potato along with a good sprinkle of salt and cook, stirring frequently, until the mixture is golden brown in spots but without a hint of burning.
Add the capers and the cream. Adjust heat so the cream is bubbling gently, pop a lid on it, and simmer until potatoes are just tender, about 10 minutes.
While the potatoes cook, boil the spaghetti until al dente and drain, reserving ¼ cup starchy cooking liquid.
Meanwhile, strip the kale leaves from their stems and tear the leaves into large bite-sized pieces.
When potatoes are just tender, heap kale leaves into pan, pour over the reserved pasta cooking water, and top with a lid. Cook until kale is wilted, tender, and reduced in volume by at least half, about 5 minutes depending on type, and stir to coat with sauce.
Add the pasta to the frying pan, sprinkle with the lemon juice, pecorino, and salt and pepper to taste, and toss everything together.