There has been an explosion of interest in time-varying photonics due to the recent discovery and design of materials and metamaterials with strong, time-varying, nonlinear optical responses. This opens the door to novel optical phenomena including reciprocity breaking, frequency translation, and amplification that can be enhanced by optimizing the light-matter interaction. Although there has been recent interest in applying topology-based inverse design to this problem, we have decided to take a more novel approach. In this article, we will introduce a method for the inverse design of optical pulse shapes to enhance their interaction with time-varying media. We test our objective-first approach by maximizing the transmittance of optical pulses of equal intensity through time-varying media. Indeed, without requiring a change in pulse energy, we demonstrate large, broadband enhancements in the pulse energy transmission through the thin-films, including gain. Our final test includes maximizing pulse transmission through indium tin oxide, a time-varying medium when strongly pumped in its ENZ band. Through this work, we hope to inspire exploration of this new degree of freedom.