So if you're interested in the detailed anatomy of the glans penis, I recommend this as a nice article to go to after you've checked general references. Opening two sentences are worth quoting here:
The human glans penis is covered by stratified squamous epithelium and
a dense layer of connective tissue equivalent to the dermis of typical
skin. Rete ridges of the epidermis are irregular and vary in height
depending on location, age, and presence or absence of a foreskin. The
papillary layer of the dermis blends into and is continuous with the
deep connective tissue forming the tunica albuginea of the corpus
spongiosum of the glans penis.
And as pointed out in The Last Word's answer, foreskin covers the penis if you look at humans in an evolutionary scale of time. The exception being an erection, which should lead to foreskin retraction (at least at some level).
So the question then becomes if the squamous epithelium and connective tissue are more prone to infection than the dermis. First, it's worth pointing out that the epidermis is not equally protective across the body. Think about the skin on your face vs. the bottom of your foot, or vs. a baby's.
I think comparing the glans penis directly to the surrounding tissue -- the prepuce (foreskin), fossa navicularis, and urethra -- makes the most sense. To make a plumbing analogy, is it the pipe (urethra), the fitting (glans penis), hole (fossa navicularis), or insulation (prepuce) that is most prone to infection?
Well, first we need to look at our pathogen, "what's doing the infecting?" For HIV, probably the urethra, but if you're interested in bacterial infection, the best things to look into are balanitis and balanoposthitis. That would be the inflammation of the glans or glans & prepuce. Here is a good review on infectious causes.
Unfortunately, there is going to a strong sampling bias due to circumcision rates. Also most studies are not going to be asking the the specific question we are trying to answer here. And it would be hard to prove that infection occurred during the erection, not immediately before or after.
I have found little evidence of bacterial infection of the prepuce but not the glans penis. I do know of cases of the reverse however, which may indicate that the glans has a greater infection rate.
However, I think it's worth pointing out the difference is not likely to be drastic, and that the surface of glans has many similarities to skin. For example, it has an epidermis and dermis. It stretches quite well, and I think dryness will be an issue far before porosity.