How to enforce that a parent must have at least one child when the PK is composite?
The CTEs (WITH and RETURNING) are there to avoid the use of deferred constraints.

It is simpler conceptually to use deferred constraints and for a homework assignment, I suggest you start with using them. Example, with comments where it differs from yours:

CREATE SEQUENCE planes_seq;

CREATE TABLE airlines (
    aid INTEGER PRIMARY KEY DEFAULT nextval('planes_seq')
);

CREATE TABLE planes (
    aid INTEGER NOT NULL REFERENCES airlines (aid)
,   pid INTEGER NOT NULL 
,   sid INTEGER NOT NULL                -- we add a default seat
        DEFAULT 1 CHECK (sid = 1)       -- in every plane
,   PRIMARY KEY (aid, pid)
);

CREATE TABLE seats (
    aid INTEGER NOT NULL
,   pid INTEGER NOT NULL
,   sid INTEGER NOT NULL
,   PRIMARY KEY (aid, pid, sid)
,   FOREIGN KEY (aid, pid) REFERENCES planes (aid, pid) 
);

ALTER TABLE planes ADD CONSTRAINT fk_seats 
    FOREIGN KEY (aid, pid, sid) 
    REFERENCES seats (aid, pid, sid) 
    DEFERRABLE INITIALLY DEFERRED ;      -- the DEFERRABLE is important


Now we can add some data:

INSERT INTO airlines (aid) 
VALUES (1) ;                      -- our 1st airline

BEGIN ;
    INSERT INTO  planes      -- its 1st plane
        (aid, pid)           -- notice: sid is added by default as 1         
    VALUES 
        (1, 1) ;

    INSERT INTO seats 
        (aid, pid, sid) 
    VALUES                    -- 3 seats in the 1st plane
        (1, 1, 1), 
        (1, 1, 2), 
        (1, 1, 3) ;
COMMIT ;


We need to insert new planes (and their seats) inside a transaction, otherwise it would fail. 

DEFERRABLE means that we can "defer" the check of the FOREIGN KEY constraint until the end of the transaction (not deferred constraints are checked immediately after insert/update/delete statements.) If you try to insert only in planes, it will fail.

INITIALLY DEFERRED means that we want to be "deferring" the foreign key constraint now, as soon as it is created. This could have been done later (you can set and unset constraints from deferred, if they have been defined as DEFERRABLE).