Я нашел решение
class CompanySpecification : Specification<Company> {
override fun toPredicate(root: Root<Company>, query: CriteriaQuery<*>, builder: CriteriaBuilder): Predicate {
return builder.like(builder.function("jsonb_extract_path_text", String::class.java, root.get<String>("data"), builder.literal("inn")), "12%")
}
}