We present an approach for computing long-range van der Waals (vdW) interactions between complex molecular systems and arbitrarily shaped macroscopic bodies, melding atomistic treatments of electronic fluctuations based on density functional theory in the former, with continuum descriptions of strongly shape-dependent electromagnetic fields in the latter, thus capturing many-body and multiple scattering effects to all orders. Such a theory is especially important when considering vdW interactions at mesoscopic scales, i.e. between molecules and structured surfaces with features on the scale of molecular sizes, in which case the finite sizes, complex shapes, and resulting nonlocal electronic excitations of molecules are strongly influenced by electromagnetic retardation and wave effects that depend crucially on the shapes of surrounding macroscopic bodies. We show that these effects together can modify vdW interactions by orders of magnitude compared to previous treatments based on Casimir--Polder or non-retarded approximations, which are valid only at macroscopically large or atomic-scale separations, respectively.