Simulating the irreversible quantum dynamics of exciton- and electron-transfer problems poses a nontrivial challenge. Because the irreversibility of the system dynamics is a result of quantum thermal activation and dissipation caused by the surrounding environment, it is necessary to include infinite environmental degrees of freedom in the simulation. Because the capabilities of full quantum dynamics simulations that include the surrounding molecular degrees of freedom are limited, employing a system-bath model is a practical approach. In such a model, the dynamics of excitons or electrons are described by a system Hamiltonian, while the other degrees of freedom that arise from the environmental molecules are described by a harmonic oscillator bath (HOB) and system-bath interaction parameters. By extending on a previous study of molecular liquids [ J. Chem. Theory Comput. 2020, 16, 2099], here, we construct a system-bath model for exciton- and electron-transfer problems by means of a machine learning approach. We determine both the system and system-bath interaction parameters, including the spectral distribution of the bath, using the electronic excitation energies obtained from a quantum mechanics/molecular mechanics (QM/MM) simulation that is conducted as a function of time. Using the analytical expressions of optical response functions, we calculate linear and two-dimensional electronic spectra (2DES) for indocarbocyanine dimers in methanol. From these results, we demonstrate the capability of our approach to elucidate the nonequilibrium exciton dynamics of a quantum system in a nonintuitive manner.