Long COVID (LC) affects millions of individuals worldwide, particularly those with preexisting comorbidities. However, whether these comorbidities should be defined before SARS-CoV-2 infection or before LC diagnosis remains unresolved, and this methodological choice may substantially bias estimates of comorbidity-associated LC risk. In addition, most previous studies were conducted during earlier phases of the pandemic and relied on relatively small or geographically restricted cohorts, limiting understanding of temporal trends and population disparities in LC risk. Leveraging Electronic Health Records (EHR) from 6,130,413 adults with documented COVID-19 across 49 U.S. states in the National COVID Cohort Collaborative (N3C) from 2020 to 2024, we evaluated the impact of different comorbidity exposure-window definitions on LC risk estimation. We utilized ensemble cross-fitted double/debiased machine learning to adjust for complex individual- and county-level confounders. Across the 16 major comorbidities evaluated, defining conditions before SARS-CoV-2 infection, rather than before LC diagnosis, yielded 23%--115% higher adjusted attributable risks and 6%--37% higher adjusted relative risks. Additionally, comorbidity-associated risks generally declined from 2020 to 2024, with substantial demographic, socioeconomic, geographic, and multimorbidity-related disparities persisting throughout the study period. These findings identify temporal exposure-window specification as a major source of bias in LC epidemiology. Failure to distinguish preexisting comorbidities from conditions identified during postinfection follow-up can substantially alter estimates of disease burden, the identification of high-risk populations, and the interpretation of temporal and geographic disparities. More broadly, our results highlight how temporal misclassification of exposures in longitudinal EHR studies can distort risk attribution and population-level inference.