PostgreSQL conditional join and value distribution with materialized view
A Window Function can be used (SUM): Display.impressions * Spend.spend / SUM(...) OVER(...)
Query:
SELECT D.date, D.pid, D.creative
    , COALESCE(
        D.impressions * S.spend 
        / SUM(D.impressions) OVER(PARTITION BY D.date, D.pid)
      , D.spend
    )
FROM display D 
LEFT JOIN spend S ON D.date = S.date AND D.pid = S.pid;

SQL Fiddle
Output:
date                        pid     creative    spend
January, 01 2016 00:00:00   1234    a           133.33
January, 01 2016 00:00:00   1234    b           266.66
January, 01 2016 00:00:00   1235    a           600
January, 01 2016 00:00:00   1236    a           300
January, 02 2016 00:00:00   1234    b           150
January, 02 2016 00:00:00   1235    a           1200
January, 02 2016 00:00:00   1236    a           166.66
January, 02 2016 00:00:00   1236    b           333.33
January, 02 2016 00:00:00   1237    a           400
January, 02 2016 00:00:00   1237    b           600