The interior surface of the pants blocks the bone “heat”. Automatic weights won’t work properly on the inside vs the outside, and they also won’t work right in relationship to the body.
First, the best thing to do for these pants is, don’t have an interior. Either build them into a single, manifold mesh describing the character and clothes, or make them a thin mesh. If they need to have an interior, consider keeping a live solidify modifier, to be calculated after the armature modifier.
Rather than weighting via automatic weights, which will never match your character, you should consider weighting via a data transfer from your character. What you will find after running a data transfer is that the weights seem sharper on the pants than on the character, and they seem sharper when they’re furthest away from the character’s surface. You can blur or smooth to eye. If your character is just autoweights, then you can autoweight a character displaced to about the size of the pants and data transfer weights from it. If you absolutely need inside of pants, and you can’t do it with a live solidify, then this is your best bet: autoweight character; make duplicate, alt s to size of
inside pants, autoweight, data transfer weights from it to inside of pants; make duplicate character, alt s to size of outside pants, autoweight, data transfer weights from it to outside of pants only; delete duplicates.