Well, I think I have found the answer.
One line above the code I have shown was
Company company = companyRepo.getUsersCompany(memberId);
Hence, company.getId() in my query was fetching company entity from postgresql. And in that process, it cast id into 'BigInteger', implicitly.
So what I had to do was explicit cast to Long, and now my method looks like this:
Company company = companyRepo.getUsersCompany(memberId);
if (company == null) return null;
CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Offer> query = cb.createQuery(Offer.class);
Root<Offer> root = query.from(Offer.class);
Long companyId = company.getId();
query = query.select(root).where(cb.equal(root.get(Offer_.companyID), companyId));
return em.createQuery(query).getResultList();