Is leaving them in there better or worse than taking them out?
In a pot, definitely take them out if you can. They will put out chemicals while decomposing (usually) that slow down the new plants (a kind of allelopathy). In a garden bed, usually this process only takes a couple weeks. Also, in a pot, the roots have the potential to mess with water movement, and wick it in odd ways, so that some areas dry faster than others.
So I'd say, in a pot, use fresh mix if possible, and in a garden bed, let the material decompose. It enhances the soil. You can also add retired potting mix to a garden bed.
What about for indoor vs outdoor? Is it okay to leave roots in a pot you plan to re-use soil for?
Similar to what I said above, indoors you are growing in pots, and you get best results if you use fresh mix each time. If you're going to reuse the mix, try to get as many roots out as possible. If the last occupant was root bound, you may not be able to separate the mix from the roots well. You can leave the roots in, and plant in the pot anyway, and I've seen some of those with decent results, but it's not ideal. Leaving the roots in works best in large pots/planters, and not so well in smaller pots. Especially down to cell pot size.
Outdoors, in the ground, leaving the roots is better, because the soil microbes will digest the roots quickly, improving the soil.