Family of functions with properties similar to k-wise independent hash functions
Let $m = 1 + \log \ell$. Identify a hash function $h \colon \{0, 1\}^k \to \{0, 1\}^m$ with its $n$-bit truth table $h \in \{0, 1\}^n$ where $n = m \cdot 2^k$. Our hash family $\mathcal{H} \subseteq \{0, 1\}^n$ consists of an $\varepsilon$-biased set for a suitable $\varepsilon = \ell^{-\Theta(k)}$. Explicit constructions of such a hash family are known with
$$
\log |\mathcal{H}| = O(\log(n/\varepsilon)) = O(k \log \ell) = O(k \log k).
$$
See e.g. this paper.
To prove that this works, fix any $\vec{x} = (x_1, \dots, x_{\ell}) \in \mathcal{S}$. Let $f_{\vec{x}} \colon \{0, 1\}^n \to \{0, 1\}$ be the function indicating whether there is a collision on the last hash, i.e.,
$$
f_{\vec{x}}(h) = \bigwedge_{i = 1}^{\ell - 1} (h(x_i) \neq h(x_{\ell})).
$$
We will show that $\mathcal{H}$ fools this function, i.e., $|\Pr_{h \in \mathcal{H}}[f_{\vec{x}}(h) = 1] - \Pr[f_{\vec{x}}(U_n) = 1]| \leq 2^{-k}$. Conditions 1 and 2 will follow.
For each $z \in \{0, 1\}^m$, define $f_{\vec{x}}^{(z)} \colon \{0, 1\}^n \to \{0, 1\}$ by
$$
f_{\vec{x}}^{(z)}(h) = \left(\bigwedge_{i = 1}^{\ell - 1} (h(x_i) \neq z)\right) \wedge (h(x_{\ell}) = z).
$$
For a fixed $z$, the function $f_{\vec{x}}^{(z)}$ can be computed by a read-once CNF with $\ell-1+m=O(\ell)$ clauses that reads the bits of the truth table of $h$. For a suitable $\varepsilon = \ell^{-O(\log(1/\delta))}$, an $\epsilon$-biased distribution fools such read-once CNFs with error $\delta$ -- see this paper. Therefore, $\mathcal{H}$ fools $f_{\vec{x}}^{(z)}$ with error $\delta$. Now, $f_{\vec{x}} = \sum_z f_{\vec{x}}^{(z)}$, so by the triangle inequality, $\mathcal{H}$ fools $f_{\vec{x}}$ with error $\delta \cdot 2^m$. Choosing $\delta = 2^{-k - m}$, we have $\varepsilon = \ell^{-O(k + m)} = \ell^{-O(k)}$ as promised.
Now let's see how conditions 1 and 2 follow. For any $\vec{x} \in \mathcal{S}$, we have $\Pr[f_{\vec{x}}(U_n) = 1] = (1 - 2^{-m})^{\ell - 1}$. This value is independent of $\vec{x}$, and it changes by at most $2^{-k}$ when we use $\mathcal{H}$ instead of $U_n$, so for every two $\vec{x}, \vec{x}' \in \mathcal{S}$, we have $|\Pr_{h \in \mathcal{H}}[f_{\vec{x}}(h) = 1] - \Pr_{h \in \mathcal{H}}[f_{\vec{x}'}(h) = 1]| \leq 2 \cdot 2^{-k}$, verifying condition 1. Meanwhile, by the union bound, $\Pr[f_{\vec{x}}(U_n) = 0] \leq \ell 2^{-m} \leq 1/2$. Again, when we switch to $\mathcal{H}$, this value increases by at most $2^{-k}$, verifying condition 2.