Cook pasta according to package directions, adding frozen peas, frozen artichoke hearts (if using), and minced garlic the last 3 minutes of cooking time. Drain, reserving 1/4 cup of the pasta water.
In a large serving bowl toss together drained pasta mixture, the pasta water, canned artichoke hearts (if using), tomato, the 1/2 cup Pecorino Romano cheese, olive oil, and pepper. Toss to combine. Sprinkle with ham and, if desired, additional shredded cheese.