Bring a large pot of salted water to a boil. Add the pasta and cook according to the directions on the package, adding the broccoli to the pot 4 minutes before the pasta is done cooking. Reserve 1 cup of the cooking water, then drain.
While the pasta cooks, prepare the sauce. Heat the olive oil in a medium saucepan. Add the ham and cook 2-3 minutes, or until lightly browned and heated through. Use a slotted spoon to transfer the ham to a plate, leaving the oil in the pan. Reduce the heat to medium and whisk the flour into the oil to form a thick paste. Let cook 1 minute, whisking constantly. Slowly whisk in the stock. Simmer 5 minutes.
Stir in the cheddar shreds little by little, allowing them to melt completely. Stir in the cream cheese and add the hot sauce, if using. If the sauce is to thick, stir in some of the pasta water to help thin it out.
Stir in the cooked pasta, broccoli, and ham. Season to taste with salt and additional hot sauce.