Text this: Class S anomalies from M-theory inflow