How to perform linear regression on clusters of data Suppose I have 2 clusters of data: $\{(Y_{1i}, X_{1i})\}_{i=1}^{n_1}$ and $\{(Y_{2i}, X_{2i})\}_{i=1}^{n_2}$, and I'm interested in running a simple linear regression on each cluster.
I assume that
$$Y_{1i} = \beta_{10} + \beta_{11}X_{1i}+\epsilon_{1i}$$
$$Y_{2i} = \beta_{20} + \beta_{21}X_{2i}+\epsilon_{2i},$$
where $\epsilon_{1i}, \epsilon_{2i}$ have mean 0 given $X$. To estimate the intercept and slope coefficients, I can minimize the empirical squared error in the two clusters separately:
$$argmin_{\beta_{10}, \beta_{11}} \frac{1}{n_1}\sum_{i=1}^{n_1}(Y_{1i} - \beta_{10}-\beta_{11}X_{1i})^2$$
$$argmin_{\beta_{20}, \beta_{21}} \frac{1}{n_2}\sum_{i=1}^{n_2}(Y_{2i} - \beta_{20}-\beta_{21}X_{2i})^2$$
Now suppose I assume that the intercept and slope coefficients are identical between the two clusters, i.e.,  $\beta_{10} = \beta_{20} = \beta_0$ and $\beta_{11} = \beta_{21} = \beta_1$. Is this equivalent to running a single linear regression model on the pooled data? i.e., I would minimize:
$$argmin_{\beta_{0}, \beta_{1}} \frac{1}{n_1 + n_2}\sum_{i=1}^{n_1 + n_2}(Y_{i} - \beta_{0}-\beta_{1}X_{i})^2$$
 A: Short answer: yes.*
The first model you describe is a "no pooling" model where coefficients are treated independently. The second is a "complete pooling" model. [1]
You can rewrite the no-pooling model with a single expression: $\hat{y}_i = \mathbb{1}[c=1](\beta_{10} + \beta_{11} x_i) + \mathbb{1}[c=2](\beta_{20} + \beta_{21} x_i)$. [2]
Fixing the no-pooling betas to be equal, $\hat{y}_i = \mathbb{1}[c=1](\beta_0 + \beta_1 x_i) + \mathbb{1}[c=2](\beta_0 + \beta_1 x_i)$, which reduces to just $\hat{y}_i = \beta_0 + \beta_1 x_i$. [3]
* Edit: As other commenters have pointed out, your pooled model also implicitly assumes homoscedasticity. I read that as an accidental omission in your description, but without that assumption, your pooled model expression is indeed no longer correct.

[1] There are also "partial pooling" models that jointly estimate shared and independent terms for different data groupings / "clusters". While you haven't asked about that explicitly, partial pooling might be interesting for you to look into for your problem.
[2] In case you're not familiar, $\mathbb{1}$ is the indicator function. In the notation I'm using, $\mathbb{1}[c=1]$ is 1 when $c=1$ and $0$ otherwise.
[3] You can also see from writing the models out like this that there are further options: for example, you can allow any combination of the intercept, the slope, and the error term variance to vary with group.
A: 
Is this equivalent to running a single linear regression model on the pooled data?

You are already running pooled data when you apply the sum for a single cluster. The equation
$$Y_{1i} = \beta_{10} + \beta_{11}X_{1i}+\epsilon_{1i}$$
can be seen as $n_1$ different clusters
$$Y_{1,1} = \beta_{10} + \beta_{11}X_{1,1}+\epsilon_{1,1} \\
Y_{1,2} = \beta_{10} + \beta_{11}X_{1,2}+\epsilon_{1,2} \\
Y_{1,3} = \beta_{10} + \beta_{11}X_{1,3}+\epsilon_{1,3} \\
\vdots \\
\vdots \\
Y_{1,n_1} = \beta_{10} + \beta_{11}X_{1,n_1}+\epsilon_{1,n_1} \\$$
Now you have $n_1 + n_2$ different clusters
$$Y_{1,1} = \beta_{0} + \beta_{1}X_{1,1}+\epsilon_{1,1} \\
Y_{1,2} = \beta_{0} + \beta_{1}X_{1,2}+\epsilon_{1,2} \\
Y_{1,3} = \beta_{0} + \beta_{1}X_{1,3}+\epsilon_{1,3} \\
\vdots \\
\vdots \\
Y_{1,n} = \beta_{0} + \beta_{1}X_{1,n}+\epsilon_{1,n} \\ 
\, \\ 
Y_{2,1} = \beta_{0} + \beta_{1}X_{2,1}+\epsilon_{2,1} \\
Y_{2,2} = \beta_{0} + \beta_{1}X_{2,2}+\epsilon_{2,2} \\
Y_{2,3} = \beta_{0} + \beta_{1}X_{2,3}+\epsilon_{2,3} \\
\vdots \\
\vdots \\
Y_{2,n_2} = \beta_{0} + \beta_{1}X_{2,n_2}+\epsilon_{2,n_2} \\$$
If the $\epsilon_{1,i}$ and $\epsilon_{2,i}$ are independent and have the same distribution*, then this is equivalent to a single cluster of $n_1 + n_2$ variables.
However it is not equivalent when the $\epsilon_{1,i}$ and $\epsilon_{2,i}$ have a different distribution/variance. In this case, you will perform some sort of weighted sum.
See How to combine two measurements of the same quantity with different confidences in order to obtain a single value and confidence . With the method in that link, if the case is that we estimate the variances of the two pools as being equal (up to a scaling with factors $X^TX$, $n_1$ and $n_2$) then the method will be the same as running a single linear regression model.

*Or even less strict if they have the same variance. You might be thinking of least squares regression without the $\epsilon$ being normal distributed and just care about the variance.
A: This depends on exactly what you mean by "equivalent" in: Is this equivalent to running a single linear regression model on the pooled data
if you mean whether you would get the same results from running regression on pooled data. Then the answer is yes.
