The trigger must be in the same schema as the table you are inserting into, but it can access tables in other schemas.
Using your example:
CREATE TRIGGER schema2.triggername
AFTER INSERT ON schema2.the_table
FOR EACH ROW
INSERT INTO schema1.the_table values (...);
source
share