Seawater intrusion (SI) poses a substantial threat to water security in coastal regions, where numerical models play a pivotal role in supporting groundwater management and protection. However, the inherent heterogeneity of coastal aquifers introduces significant uncertainties into SI predictions, potentially diminishing their effectiveness in management decisions. Data assimilation (DA) offers a solution by integrating various types of observational data with the model to characterize heterogeneous coastal aquifers. Traditional DA techniques, like ensemble smoother using the Kalman formula (ESK) and Markov chain Monte Carlo, face challenges when confronted with the non-linearity, non-Gaussianity, and high-dimensionality issues commonly encountered in aquifer characterization. In this study, we introduce a novel DA approach rooted in deep learning (DL), referred to as ESDL, aimed at effectively characterizing coastal aquifers with varying levels of heterogeneity. We systematically investigate a range of factors that impact the performance of ESDL, including the number and types of observations, the degree of aquifer heterogeneity, the structure and training options of the DL models. Our findings reveal that ESDL excels in characterizing heterogeneous aquifers under non-linear and non-Gaussian conditions. Comparison between ESDL and ESK under different experimentation settings underscores the robustness of ESDL. Conversely, in certain scenarios, ESK displays noticeable biases in the characterization results, especially when measurement data from non-linear and discontinuous processes are used. To optimize the efficacy of ESDL, attention must be given to the design of the DL model and the selection of observational data, which are crucial to ensure the universal applicability of this DA method.