Let
$n\ge 1$,
$r\ge 0$, and
$s\ge 0$ be integers satisfying
$4+r+3 s\le 3^{n+1}$. Given linear polynomials
$f_{i}(x)=m_{i} x+n_{i}$ for
$1 \le i \le r+s$, where the coefficients
$m_{i} , n_{i}$ are positive integers satisfying certain conditions, we prove that there exist infinitely many fundamental discriminants
$D>0$ such that the 3-rank of the class group of each quadratic fields
$\mathbb {Q}(\sqrt {f_1(D)}), \ldots , \mathbb {Q}(\sqrt {f_r(D)})$ and
$\mathbb {Q}(\sqrt {-f_{r+1}(D)}), \ldots , \mathbb {Q}(\sqrt {-f_{r+s}(D)})$ is simultaneously less than n. For a positive integer
$k $, let
$g_1,\dots ,g_k\in \mathbb {Q}[x]$ be polynomials taking integer values at integers with
$g_i(0)=0$. We also prove that there exist positive integers
$a,d$, such that each
$a+g_i(d)$ is a fundamental discriminant and the 3-rank of the class group of each quadratic field
$\mathbb {Q}(\sqrt {a+g_1(d)}), \ldots ,\mathbb {Q}(\sqrt {a+g_k(d)})$ is simultaneously less than n. Moreover, these discriminants can be chosen all positive or all negative, giving either all real or all imaginary quadratic fields
$\mathbb {Q}(\sqrt {a+g_i(d)})$.