Find all family $\mathcal{F}$ of subsets of $[n]$ such that for any nonempty subset $X\subseteq [n]$, exactly half of the elements $A\in \mathcal{F}$ satisfies that $|A\cap X|$ is even.
1. **Mapping Sets to Vectors:**
   We start by mapping every set \( A \subseteq \{1, 2, \dots, n\} \) to a vector \( v_A \) in \( F_2^n \). The rule is that the \( i \)-th coordinate of \( v_A \) is \( 1 \) if and only if \( i \in A \).

2. **Defining the Set \( S \):**
   Let \( S = \{v_A : A \in \mathcal{F}\} \). Let \( N = |S| = |\mathcal{F}| \). The condition of the problem translates to: For every hyperplane \( P \), we have 
   \[
   |S \cap P| = |S \cap \bar{P}| = \frac{N}{2}.
   \]

3. **Lemma 5:**
   For any linearly independent hyperplanes \( P_1, P_2, \dots, P_x \), it holds that 
   \[
   |S \cap P_1 \cap P_2 \cap \cdots \cap P_x| = \frac{N}{2^x}.
   \]

4. **Proof of Lemma 5:**
   We will use induction on \( x \).

   - **Base Case:**
     For \( x = 1 \), it holds by the condition given in the problem.

   - **Inductive Step:**
     Suppose that for any \( x - 1 \) linearly independent hyperplanes, the hypothesis holds. Then, for the linearly independent hyperplanes \( P_1, \cdots, P_{x-2}, P_{x-1} \), it holds that
     \[
     |S \cap P_1 \cap \cdots \cap P_{x-2} \cap P_{x-1}| = \frac{N}{2^{x-1}}.
     \]
     (Equation 1)

     Furthermore, for the linearly independent hyperplanes \( P_1, \cdots, P_{x-2}, P_x \), it holds that
     \[
     |S \cap P_1 \cap \cdots \cap P_{x-2} \cap P_x| = \frac{N}{2^{x-1}}.
     \]
     (Equation 2)

     Lastly, for the linearly independent hyperplanes \( P_1, \cdots, P_{x-2}, (P_{x-1} \bigtriangleup P_x) \), it holds that
     \[
     |S \cap P_1 \cap \cdots \cap P_{x-2} \cap (P_{x-1} \bigtriangleup P_x)| = \frac{N}{2^{x-1}}.
     \]
     (Equation 3)

     By adding Equations (1) and (2) and subtracting Equation (3), we count exactly twice the intersection between the sets in Equations (1) and (2). Thus,
     \[
     2|S \cap P_1 \cap \cdots \cap P_{x-1} \cap P_x| = \frac{N}{2^{x-1}},
     \]
     and the result follows.

5. **Conclusion from Lemma 5:**
   Note that the following \( n \) hyperplanes 
   \[
   x_1 = 0, \quad x_2 = 0, \quad \dots, \quad x_n = 0
   \]
   are linearly independent. Thus, by Lemma 5, \( \frac{N}{2^n} \) is an integer. Since \( 0 \le N \le 2^n \), this implies that \( N = 0 \) or \( N = 2^n \). This means that \( \mathcal{F} = \varnothing \) or \( \mathcal{F} = \mathcal{P}(\{1, 2, \dots, n\}) \). Note that, in fact, those choices for \( \mathcal{F} \) work.

The final answer is \( \boxed{ \mathcal{F} = \varnothing } \) or \( \mathcal{F} = \mathcal{P}(\{1, 2, \dots, n\}) \).