Choosing one number from each set so that the sum of squares of each distinct number counts is minimized Problem is as follows:
We are given $K$ subsets of $\{1,2,...,n\}$. We need to pick one number from each of these subsets such that $\sum_{i=1}^n p_i^2$ is minimized where $p_i$ is the number of times $i$ is repeated among picked numbers. Is there an efficient algorithm to do this?
Regarding the NP-hardness tag, your problem can be shown to be in $P$ (and thus likely not $NP$-hard) via a reduction to min-cost flow with $O(nK)$ vertices and $O(nK^2)$ edges.

It will help to have a visual to refer to for the construction. Below is a figure showing how we construct the min-cost flow instance with $n=K=3$, with the set family $A=\{1,2\}, B=\{1,2,3\}, C=\{2,3\}$.



All edges are directed rightwards. Red edges have cost 0 and capacity 1. Blue edges have cost 0 and capacity $K$. Black edges have capacity $1$ and cost indicated in the figure. We demand that $s$ route $K=3$ units of flow to $t$.

We refer to the nodes corresponding to $[n]$ (above labeled $1$, $2$, and $3$) as "number nodes" and those corresponding to the $K$ sets (above labeled $A$, $B$, and $C$) as "set nodes". The unlabeled nodes are called "central nodes", and we say that a given central node corresponds to the unique adjacent number node.

All costs and capacities are integral, so w.l.o.g. we can consider only integral feasible solutions to the problem. The capacity constraints on the red edges ensure that, in any feasible solution, each set node must send over exactly one unit of flow to $t$, corresponding to the constraint that we pick one element from each set. This unit of flow must have arrived from one of the $nK$ central nodes, which in turn must have arrived from its corresponding number node. Finally, this number node received its flow from $s$.

Thus, if we track the path taken by each unit of flow in a solution to the constructed flow instance, we see that it goes through both a number node $c$ and through a set node $S$, corresponding to a choice of a number $c$ from that set $S$ in the original instance. As for the costs, any solution that routes $p_i$ units of flow to a number node labeled $i$ must incur a cost of at least $\sum_{j=1}^{p_i}\left(2j-1\right) = {p_i}^2$ on the node's out-edges. In an optimal solution, this holds with equality. As all other edges have zero cost, optimal solutions to this flow problem thus have cost $\sum_{i=1}^{n}{p_i}^2$, as desired.

In general, $s$ has a blue edge to each of $n$ number nodes (labeled $1, 2, \cdots, n$), each of which is adjacent to its own distinct set of $K$ different central nodes. The edges connecting the number nodes to the central nodes all have capacity $1$ and varying costs equal to the first $K$ positive odd numbers. A central node corresponding to a number node with label $c$ is then connected with a blue edge to each of the set nodes for which the set contains $c$. The set nodes correspond to each of the $K$ sets. Finally, all set nodes are connected to $t$ with a red edge.

More generally, the same construction works with any convex cost structure, after the necessary modifications.