Bring a large pot of salted water to a boil. Add the pasta and cook as the label directs. Drain, reserving 1 cup cooking water.
Trim the zucchini, then coarsely grate into a colander set in the sink. Toss the zucchini with 1/4 teaspoon salt and let sit 10 minutes.
Meanwhile, heat the olive oil in a large skillet over medium heat. Add the garlic, red pepper flakes and 1/4 teaspoon salt and cook, stirring, until the garlic is golden, 3 to 4 minutes. Add the tomatoes and cook until slightly softened, 3 to 4 minutes. Squeeze any excess moisture from the zucchini, then add to the skillet. Add the pasta, ham and the reserved cooking water and toss until warmed through, 2 to 3 minutes. Season with salt and pepper. Remove from the heat and fold in the cheese, parsley and mint.