Election widely seen as referendum on Poland's future after several years in which ruling Law and Justice Party shifted country increasingly rightward