The conventional practice of using sewage treatment plant (STP) derived sludge as a fertilizer poses significant negative impacts on agroecosystems. Since sludge has diverse contaminants, including heavy metals (HMs), antibiotics (ABs) and antibiotic resistance genes (ARGs), its application in the agricultural fields contaminates the food and hence causes human health risks via the food chain. The transfer of ABs and ARGs from sludge to soil and then to plants can influence the development of antibiotic resistance (AR) in plant endophytes, and leads to variations in their characteristics. In a pot experiment, vegetable carrot (Daucus carota) and spinach (Spinacia oleracea) were amended with sludge samples from three sewage treatment plants (STPs) with varying treatment capacities and both above and below-ground parts of the plants were analysed for the presence of specific ABs (amoxicillin, azithromycin, chloramphenicol, ciprofloxacin, tetracycline), ARGs (blaCTX-M, blaGES, blaNDM, ermF, qnrS, Sul1), and mobile genetic elements (MGEs) (intl1, IS26). Among the characterized culturable endophytic bacteria (EB), 22 exhibited resistance to various antibiotics (highest against ampicillin, ciprofloxacin, chloramphenicol) and heavy metals (highest against lead, nickel, and chromium). Most importantly, seven multiple antibiotic-resistant endophytic bacteria (MAREB) exhibited resistance to all tested heavy metals (HMs). Additionally, all MAREB tested positive for biofilm production, and a notable proportion (72.72%) of these endophytes displayed mobility, with strong auto-aggregation ranging from 16.67 to 92.61%. The biofilm formation dynamics among these MAREB exhibited a Gaussian distribution pattern, increasing with higher antibiotic concentrations. Notably, five MAREB demonstrated survival at clarithromycin concentrations up to 150 µg ml−1. The study revealed the presence of ABs (µg kg−1) and ARGs (copies kg−1) in all parts of both vegetables, ranging from 2.87 to 314.88 and 1 × 105 to 3.2 × 1010, respectively. MAREB displayed various advantageous features to support plant growth under different stress conditions. Moreover, 51.09% of the identified EBs were reported as both plant and human-associated pathogens, and 9.09% were solely human pathogens. Transfer factor (TF), translocation factor (TLF), and bioconcentration factor (BCF) values were correlated with higher ABs and ARGs abundance in the root and shoot compartments of both vegetables. The risk assessment for ABs and ARGs highlighted children are particularly vulnerable to prolonged adverse health risks from consuming these vegetables. Therefore, this research is imperative for understanding the co-selection mechanisms, the need for improvement of the existing treatment systems in contaminants removal, and the evaluation of the presence of ABs and ARGs in sludge before its application in agricultural fields.