create table xxx
tablespace shared
storage
(initial 50m next 50m pctincrease 0)
as
(select * from xxx@db-link);


it is your tablespace SHARED that is full, nothing to do with temp tablespace as slimdave already pointed out

unless xxx is a view contains some grouping functions