Bring a large pot of water with a small handful of salt to a boil. Cook gnocchi 3-4 minutes or until they float to the surface. Remove and set aside.
Heat a deep skillet over medium heat. Grease with a splash of oil and cook ham steak about 4-5 minutes per side. Remove from heat and dice into chunks.
In the same pan, melt butter and saute garlic and shallots until fragrant (about 1 minute). Whisk in flour, until a paste forms. Slowly add in milk, whisking constantly. Bring this mixture to a light simmer. Add thyme, mustard, and cheeses. Stir until smooth and season with salt and pepper. Remove from heat and stir in 3/4 cup peas, gnocchi, and ham.
Transfer mixture to a shallow baking dish. Sprinkle with the remaining 1/4 cup peas and breadcrumbs if desired. Bake for 18-20 minutes or until bubbling.