Meatballs and Spaghetti in the InstantPot separately
I have't done it, so I don't know if this will work, but here's what I would suggest:

Pasta will cook more quickly if you soak it before cooking.  (it also allows you to get 'al dente' with gluten-free pasta)

You can then put the pasta in the inner pot, while the meatballs are closer to the heat.  But you might have to experiment for just how long to soak the pasta before putting it in the pot, and what temperature water to use in the pot.  (you do the soak in room temperature water)

I'd also recommend changing your type of pasta.  Strand pasta is notorious for the need to stir to prevent it from clumping together; something like fusilli (spirals) won't contact each other as much, so they won't have as much variation in doneness.