Bring a medium saucepan of water to a boil over high heat. Add pasta and cook according to package directions. Reserve 1 cup of water, then drain the pasta.
Meanwhile, heat oil in a large skillet over medium-high heat. Add pancetta and cook, stirring occasionally, until crispy, 6 to 8 minutes. Remove with a slotted spoon to a plate. Add lima beans and shallots to the pan. Cook, stirring occasionally, until the shallots are tender, about 3 minutes. Stir in garlic and rosemary; cook, stirring, until fragrant, about 1 minute. Add spinach and cook until wilted, about 2 minutes.
Add the pasta and the reserved water to the pan. Cook, stirring, until the sauce is thickened, about 1 minute. Stir in lemon juice, the pancetta and half the pecorino. Serve the pasta topped with the remaining pecorino.
