Key Inclusion Criteria:  Recurrent or metastatic EBV+ nasopharyngeal carcinoma (RM-NPC) for whom no potentially curative options are available, who have received at least 1 prior line of platinum-based chemotherapy and no more than 3 prior lines of therapy. Phase 1b exploratory proof-of-concept cohort only: Advanced/metastatic EBV+ non-NPC solid tumors with no available curative therapies. Measurable disease per RECIST v1.1 ECOG performance status 0 or 1 Adequate bone marrow and liver function  Key Exclusion Criteria:  Anti-tumor treatment with cytotoxic drugs, biologic therapy, immunotherapy, or other investigational drugs within 4 weeks or >5 half-lives, whichever is shorter Active CNS disease Inability to take oral medication, malabsorption syndrome or any other gastrointestinal condition (nausea, diarrhea, vomiting) that may impact the absorption of nanatinostat and valganciclovir Active infection requiring systemic therapy Active autoimmune disease that has required systemic therapy with modifying agents, corticosteroids, or immunosuppressive agents Positive hepatitis B or hepatitis C