Bring a medium pot of salted water to a boil over high. Whisk together cheeses, egg yolks, and pepper in a medium bowl until combined; set aside.
Add pasta to boiling water; cook, stirring occasionally, until pasta is cooked according to package directions for al dente, 7 to 8 minutes. Drain pasta in a colander over a bowl, reserving 1 cup of the cooking water. Return drained pasta to pot, and let cool 3 minutes.
While pasta cooks, heat oil in a large nonstick skillet over medium-high. Add ham; cook, stirring every 2 minutes, until browned, about 6 minutes. Add peas, shallot, and garlic; cook, stirring occasionally, until peas are just tender, about 2 minutes. Remove from heat.
Ladle ⅓ cup of the reserved cooking water into egg mixture; whisk until blended. Whisk in another ⅓ cup cooking water to loosen the egg mixture. Quickly and gently toss egg mixture into cooked pasta so eggs don’t scramble. Continue tossing gently until cheeses are melted and a creamy sauce forms and coats pasta, about 1 minute. Add chopped fresh herbs and ham mixture; toss gently to combine.
Divide pasta mixture among 4 plates. Garnish with additional herb leaves and grated cheese.
