Closing gap around floor transition strip and door trim
The better way is to extend the door side casing trim to the floor surface. Ideally that would involve removing the old paint covered trim and replacing with a new longer piece. 

The alternative, as you propose, to run the base shoe molding under a foreshortened casing is not going to look too great as there will still be an ugly gap due to the rounded top of the base shoe. 

It may be a better alternative to cut the door casing up even higher and then place in a block of wood that is slightly thicker than the casing. This can act as a grounding for the casing and the adjacent base shoe can come up to it as well. The end of the base shoe molding can be mitered so that it does not have the unfinished look that the current square cut presents. 

The height of this added grounding block could be coordinated with the adjacent baseboard that the base shoe molding is attached to. Additionally you could consider to add a matching grounding block to the other side of this same doorway to provide a balanced look.

The picture below gives an idea of what I am suggesting. It also shows how base shoe molding is cut back at an angle. Note that I am not suggesting that you place a "baseboard and shoe molding" in through the doorway as depicted as the bright white part of the picture. 



Picture Source