Deep-learning-based surrogate modeling of flow and coupled flow-geomechanics for data assimilation in subsurface systems