Text this: Shape optimization and spectral theory