I have no proof of this theiry, but it's possible that secular picked up its meaning of "lack of religious significance" because of the word "regular":
late 14c., from Old French reguler "ecclesiastical" (Modern French régulier), from Late Latin regularis "containing rules for guidance," from Latin regula "rule," from PIE reg- "move in a straight line" (see regal).
Earliest sense was of religious orders (the opposite of secular).
Extended from late 16c. to shapes, etc., that followed predictable or
uniform patterns; sense of "normal" is from 1630s; meaning "real,
genuine" is from 1821. Old English borrowed Latin regula and nativized
it as regol "rule, regulation, canon, law, standard, pattern;" hence
regolsticca "ruler" (instrument); regollic (adj.) "canonical,
When "regular" began to mean "appearing repeatedly, on pattern", perhaps that's when people started using "secular" (meaning "appearing only once") to contrast with it. Then "secular", being in contrast with "regular", could have picked up the opposite of the other meaning of "regular" as well.
Or that could be a complete coincidence.