Preheat the oven to 400°F (200°C). Grease a dark-colored large sheet pan with cooking spray; do not line with foil or parchment.
Peel and grate the onion using the large holes of a box grater; pack the grated onion into a measuring cup to equal 1/2 cup and add it to a large mixing bowl.
Add the ground chicken, panko breadcrumbs, grated Parmesan, olive oil, chopped parsley, salt, pepper, chicken bouillon powder, onion powder, garlic powder, Italian seasoning, and the egg to the bowl.
Gently mix the ingredients until just combined, taking care not to overwork the meat so the meatballs stay tender.
Use a 1-tablespoon measuring spoon to scoop a heaping amount of the mixture and roll into balls with lightly greased hands; aim for about 28–30 meatballs.
Place the meatballs on the prepared pan, spacing them apart. Spray the tops generously with cooking spray.
Bake for 17 minutes, then flip each meatball using a sharp metal spatula and bake for an additional 5–10 minutes (about 8 minutes) until browned and cooked through.
Cook the spaghetti according to package instructions for al dente, reserving 1 cup of pasta cooking water before draining.
Toss the drained pasta with 1 cup pesto and 1/2 cup reserved pasta water, adding more water if needed to reach desired creaminess. Serve meatballs on top with extra pesto, a squeeze of lemon juice, and additional Parmesan if desired.