Quick summary: Your model should still be well specified, as long as:
1) You do the analysis on a heavily traded asset, e.g. IBM on NYSE, and
2) You use heteroskedasticity-consistent standard errors in your estimation framework, e.g. White's standard errors.
I'm going to start the long answer by re-stating the question to make sure I've got it right.
Let $v_{t_n}$ denote true volatility on day $t$ of a return that spans $[t_0, t_n]$, where $n$ is also stochastic, and is the time of the first trade that you make. Let $c_t$ be the cost associated with your first trade on day $t$. Then you want to estimate the model:
\begin{equation}
c_t = \alpha + \beta v_{t_n} + e_t
\end{equation}
where we make the usual assumptions on our residual $e_t$, e.g. $\mathbb{E} e_t | v_{t_n} = 0$, e.t.c. $c_t$ is observable (I'm assuming), but $v_{t_n}$ is obviously not observable. Thus instead you replace $v_{t_n}$ with the estimator $\hat{v}_{t_n}$ which is realised volatility, estimated using all available 5-minute returns on day $t$ from time $t_0$ to $t_n$, where these returns are constructed from looking at all transactions that are publicly available on day $t$.
Let's assume (to make life easier) that $t_n$ falls on an exact multiple of $5$ minutes after $t_0$, and that similarly you are able to observe other transactions on each exact multiple of $5$ minutes in order to construct your realised vol. If the above assumptions are not satisfied, it is just a matter of scaling things by the appropriately small increments of time.
We can always write our estimator as follows:
\begin{equation}
v_{t_n} = \hat{v}_{t_n} + u_t
\end{equation}
that is, true vol is equal to realised vol plus an estimation error term. Subbing the equation into your original regression gives:
\begin{equation}
c_t = \alpha + \beta (\hat{v}_{t_n} + u_t) + e_t
\end{equation}
or rather:
\begin{equation}
c_t = \alpha + \beta \hat{v}_{t_n} + \epsilon_t
\end{equation}
where $\epsilon_t = \beta u_t + e_t$. We need at least $\mathbb{E} \epsilon_t | \hat{v}_{t_n} = 0$ to estimate the model in its present form. I would be reasonably willing to make this assumption for a heavily traded asset. Roughly speaking, we are assuming that our realised vol error is centred on zero and that whether it takes a positive or negative value on any given day is not related to the magnitude of realised vol. Note that for a thinly traded asset, this assumption would be a bit dodgy, since we might expect realised vol to exhibit a larger positive bias on days when true vol is small (since the vol from microstructure noise will be larger relative to true vol). So there is our first constraint: make sure you do the analysis on a heavily traded stock, like IBM on NYSE for example.
What other intuition can we get from the model? Well, assuming $cov(e_t, e_s) = 0, t \neq s$ seems reasonable, and similarly I can't see any reason why $cov(u_t, u_s)$ wouldn't be zero, so we can safely assume $cov(\epsilon_t, \epsilon_s) = 0$.
Finally, we get the the heart of your question: We would definitely expect that $\mathbb{V} u_t \neq \mathbb{V} u_s, t \neq s$, since, as you point out, some realised vols will be calculated using 1 return, and others might use 70 returns (I don't want to go into the exact relationship in too much detail as the analysis is not necessarily straightforward - standard realised vol theory uses infill asymptotics, but the situation we have here is more akin to regular asymptotics, and the true parameter of interest spans a different time interval on different days...).
But I don't think we need to worry about that. All that matters is that we can be fairly sure that $\mathbb{V} \epsilon_t \neq \mathbb{V} \epsilon_s, t \neq s$. In other words, our regression will exhibit heteroskedasticity. So do not use OLS. Instead, use heteroskedasticity consistent standard errors, e.g. White's standard errors. Any decent statistical software will provide standard routines for this. Note, you shouldn't need to worry about getting full HAC-consistent standard errors, since there is no reason to believe the residuals will exhibit autocorrelation (although maybe test for it just to be safe).
Note, of course your estimates of the parameters of your model will not be as good because you are using realised vol insted of true vol. There isn't really anything you can do about this except use as many observations as you can possibly get your hands on. However, your primary concern which is the statistical effects from the noise in your RV estimators has hopefully been dealt with by my analysis above.
One other thing: If you start using your second, third, and fourth, e.t.c. trade from a given day, then you will need to revisit this analysis as I'm fairly sure that will introduce some non-trivial dependence into the residuals of your regression.
Cheers,
Colin
ps if you feel I have answered the question, please click the tick mark and consider upvoting (the up arrow).