Add olive oil to the Instant Pot and set to Sauté. Add the carrots, celery, and onion and cook for 5 minutes. Add the garlic and cook another 30 seconds, until fragrant. Press Cancel to turn off Sauté mode.
Add the tortellini, broth, salt, chile flakes, thyme, rosemary, and pepper, and stir well. Add the tomatoes with their juices and stir again.
Place the lid on the Instant Pot and make sure the valve is set to Seal. Set to Manual High Pressure and change the timer to 5 minutes.
Once the timer goes off, quick release the pressure valve and remove the lid. Stir in the spinach until wilted.