Text this: Melting-free integrated photonic memory with layered polymorphs