Why is my wheel going out of true after I mount and inflate the tire?
why are the spokes not equally screwed into the nipples? Of course, there might be discrepancy between the drive- and non-drive sides, but on the same side, there’s a millimeter or two of difference.

That's a sign spoke tensions are not equal.
The fact that spoke tensions are not equal is a sign spoke tensions are low.
Increase your spoke tensions to the required level and equalize them.
Besides, how did you see that spokes are not equally screwed? Do you see the threads below the spoke ends at the rim? If you do, the spokes are too short. The only way that in a well-built wheel you can observe if spokes are equally screwed is to look at the spoke threaded end inside the rim.

Before installing the tire, I had the wheel trued pretty well (within one millimeter in all directions). With the tire on, it’s now got a few millimeters of lateral runout. What could be causing this?

Tire inflation pressure affects spoke tension. The more inflation you have, the less spoke tension you have.
To ensure this is not a problem, the tension of spokes before inflation needs to be as high as possible.