Enforcing constraints "two tables away"
Minimal solution
One radical solution might be to remove pin_inst completely:
  part ←────────── pin
    ↑               ↑
part_inst ←───── pin_inst

There is nothing in your question to suggest you actually need the redundant table. For pins associated to a part_inst, look at the pins of the associated part.
That would simplify the code to:
create table part (    -- using singular terms for table names
    part_id bigserial primary key
);
create table pin (
    pin_id bigserial primary key,
    part_id bigint not null references part
);
create table part_inst (
    part_inst_id bigserial primary key,
    part_id bigint not null references part
);

But your comment made clear that we won't get away with that ...
Alternative if pin_inst is needed
Including part_id like you did is the simplest solution with foreign key constraints. You cannot reference a table “two tables away” with foreign key constraints.
But you can at least make do without &quot;polluting&quot; the primary keys. Add UNIQUE constraints.
create table part (
    part_id bigserial primary key
);
create table pin (
    pin_id bigserial primary key,
    part_id bigint not null references part,
    unique(part_id, pin_id)         -- note sequence of columns
);
create table part_inst (
    part_inst_id bigserial primary key,
    part_id bigint not null references part,
    unique(part_id, part_inst_id)
);
create table pin_inst (
    pin_inst_id bigserial primary key,
    part_inst_id bigint not null,
    pin_id bigint not null,
    part_id bigint not,
    foreign key (part_id, pin_id) references pin,
    foreign key (part_id, part_inst_id) references part_inst
);
I put part_id first in the unique constraints. That is irrelevant for the referential integrity, but it matters for performance. The primary keys already implement indexes for the pk columns. It's better to have the other column first in the multicolumn indexes implementing the unique constraints. Details under these related questions:

Working of indexes in PostgreSQL
Is a composite index also good for queries on the first field?
Many to Many and Weak Entities

Related questions on SO:

Can a multi-field UNIQUE constraint include fields from more than one table?
Foreign key constraint with some column values residing in other tables

Alternative with triggers
You could resort to triggers functions, which are more flexible, but a bit more complicated and error prone and a bit less strict. The benefit: you could do without part_inst.part_id and pin.part_id ...