The compost-bedded pack barn (CBPB) system has been increasingly adopted by dairy farms due to its ability to enhance animal comfort and milk production. This study evaluated the associations among bedding characteristics, milk quality and composition, and subclinical mastitis (SCM) occurrence in dairy herds housed in CBPB systems. Over a period of six months, data related to milk quality and udder health and bedding sampling were collected from eight dairy farms. Monthly measurements of the bedding temperature and wind speed inside the CBPB were taken, while temperature and relative humidity data inside the CBPB were recorded using a datalogger. Bedding samples were subjected to analysis of moisture, pH, microbiological count, and carbon/nitrogen ratio. Data on milk composition (fat, protein, milk urea nitrogen, and total solids) and quality (somatic cell count and standard plate count) of bulk tank milk were obtained from DHIA results. Canonical correlation analyses were used to evaluate the association between the analyzed group variables, and linear regression models were used to identify associations between bedding characteristics and SCM occurrence in the studied herds. The bedding characteristics that most influenced milk composition and quality were moisture, temperature at 30 cm depth (T30), and bedding pH. Environmental variables played an important role in bedding composting, as they were closely related to the surface temperature and pH. Overall, 62.71% of the variation in milk quality and composition could be explained by the bedding variables, and 77.50% of the variation in the bedding variables was associated with environmental variables. Median SCM prevalence and incidence were 28.6 and 13.8%, respectively. An increase of 1 °C for T30 resulted in a 0.6% reduction in the prevalence of SCM. Additionally, the bedding surface temperature at 22.3 °C resulted in the highest incidence of SCM (~18.1%). Our results demonstrate the importance of controlling microclimatic conditions in the CBPB to optimize the bedding composting process and milk quality.