Preheat oven to 350 degrees. Bring a large pot of slightly salted water to a boil; cook the pasta in the boiling water, stirring occasionally, until tender, about 10 minutes. Drain.
Place pasta, thawed broccoli and ham in an oven-safe baking dish. In a small saucepan, melt butter over low heat and add salt, nutmeg and flour, stirring constantly until well blended.
Add milk and continue stirring. Once sauce thickens, add grated cheese and stir until cheese melts and sauce is smooth. Pour cheese sauce over ham, broccoli and pasta, coating well. Bake for 20 minutes.