Press the sauté function on the Instant Pot and allow to heat up for a minute or two. To the inner pot of the Instant Pot, add onion, carrots and celery and cook until the veggies begin to soften. Add garlic and cook for 30 to 60 seconds more.
To the softened veggies, add in diced tomatoes, tomato paste, oregano, basil, salt, pepper and red pepper flake.
Add in chicken broth and pasta along with kidney beans or cannellini beans. Stir to combine making sure that the pasta is covered by the broth.
Place the lid on the Instant Pot, set the valve to the sealing position, then switch the instant pot from the sauté function to the "manual" function (high pressure). Set the timer for 5 minutes.
Release the pressure - when the timer goes off, use the quick pressure release option to release the pressure.
Add in green beans, fresh parsley and spinach then stir to combine. Allow the heat from the soup to heat the green beans through and wilt the spinach. This will take about 5 minutes.
Adjust seasonings - feel free to add 1-2 teaspoons sugar to balance the flavor.
Top with freshly grated parmesan cheese and serve.