Learning Green's functions associated with time-dependent partial differential equations