Add onions, celery, carrots, and red pepper. Saute for approximately 5 minutes or until vegetables are slightly soft, stirring constantly.
Add the garlic, thyme, salt, and pepper and heat for an additional 1 minute, stirring constantly. Add mushrooms, if desired, and stir for 1 minute.
Add rice and stir to completely combine.
Add the tomatoes and vegetable stock for a sticky rice. (If you prefer your rice NOT to be sticky use one cup rice to 1 ¼ cups of liquid. Take into account liquid in the can of tomatoes.)
Transfer rice mixture into a crock, corning ware or metal bowl—any bowl that will fit the Instant Pot with a lid or that can be covered with aluminum foil.
Stir in the cubed squash and zucchini to the rice mixture.
Put about an inch and a half of water in the bottom of Instant Pot. Place trivet in Instant Pot. Place the bowl with rice mixture on trivet. Cover bowl with a lid or tightly with aluminum foil.
Lock lid into place and close steam valve. Select "MANUAL" and set cook time for 22 minutes. When cook time is done, let rest for 10 minutes before releasing any remaining steam.
Open lid and carefully remove bowl. Stir to combine.