Bring a large pot of salted water to a boil. Add the spaghetti and cook as the label directs for al dente. Reserve 1 cup cooking water, then drain.
Meanwhile, combine the olive oil and shallot in a large pot over medium heat. Cook, stirring occasionally, until the shallot is softened, 3 to 5 minutes. Add the wine and simmer until mostly reduced, 2 to 3 minutes. Add the cheese spread, mustard, ham, spaghetti and 1/2 cup of the reserved cooking water. Cook, tossing, until the spaghetti is coated with the sauce, 1 to 2 minutes, adding more cooking water as needed to loosen (the pasta will absorb the sauce as it sits). Season with salt, add the parsley and toss again.
Divide the spaghetti among shallow bowls. Spoon any remaining sauce on top and season generously with pepper.