Lets say we are given the following definition of a CDF $F(x)$.
$$ F(x)=\begin{cases} 0, && x &\lt &\sqrt{2} \\ x^2-2, && \sqrt{2} &\leq x \lt &\sqrt{3} \\ 1, && \sqrt{3} &\leq x \end{cases} $$
Does it even matter whether we define the respective PDF $f(x)$ as
$$ f(x)=\begin{cases} 2x, && x \in [\sqrt{2}, \sqrt{3}] \\ 0, && \text {otherwise} \end{cases} $$
versus the following
$$ f(x)=\begin{cases} 2x, && x \in [\sqrt{2}, \sqrt{3}) \\ 0, && \text {otherwise} \end{cases} $$
Basically I am asking whether or not the brackets matter. Or are they all the same, and I can just play around with any combination I want $[] = () = [) = \ ...$?
For continuous random variables, probabilities of events are obtained by integration over the density function over the relevant event. In fact, in measure-theoretic treatments of probability (which are generally taken to be the proper formalism), for a continuous distribution function, the probability density is defined as the Radon-Nikodym derivative of the probability measure induced by that distribution. This derivative is unique only up to a set of measure one, so you can change any of the points on a countable set of values without invalidating the density.
So, in this case, both of those definitions of the density are fine, and there are also an infinite number of other densities that are valid. (You can alter any countable number of points on the density and it is still a valid Radon-Nikodym derivative of the distribution function.) Here is another example of a valid density function, which is annoying, and breaches convention, but is technically valid:
$$f(x) = \begin{cases} 2x & & x \in [\sqrt{2}, 1.5) \cup (1.5 \sqrt{3}] \\[6pt] \pi & & x = 1.5, \\[6pt] 0 & & \text {otherwise}. \end{cases}$$
Now, although this is technically a valid density function, by convention we usually try to choose the simplest density function possible, so we don't monkey around with points just because we can. If the Reimann derivative of the distribution function exists at a point then we always set the density to be equal to that derivative, to preserve smoothness. Endpoints and other "kink" points with no Reimann derivative give rise to cases where we can choose the value of the density, and in these cases we almost always set it to the left or right limit of the Reimann derivative of the distribution function (just as you have done).