In your aes, you can use interaction of your x values and your categorical values for plotting boxplot on a continuous x axis and pass position = "identity" in order to place them on the precise x values and not to be dodged.
Here to add the line connecting each boxplot, I calculate mean per Species per x values using dplyr directly inggplot but you can calculate outside and generate a second dataframe.
So, as your x values are pretty spread from 1 to 23500, you will have to modify the width of the geom_boxplot in order to see a box and not a single line:
library(ggplot2) library(dplyr) ggplot(df,aes(x = Xvalues, y = Yvalues, color = Species, group = interaction(Species, Xvalues)))+ geom_boxplot(position = "identity", width = 1000)+ geom_line(data = df %>% group_by(Xvalues, Species) %>% summarise(Mean = mean(Yvalues)), aes(x = Xvalues, y = Mean, color = Species, group = Species))

So, apply to your dataset (based on informations you provided in your code), you should try something like:
library(ggplot2) library(dplyr) ggplot(observedotusrare, aes(x=Sequencing.Depth, y=Observed.OTUs, color=SpeciesCode, group = interaction(Sequencing.Depth, SpeciesCode))) + geom_boxplot(position = "identity", width = 1000) + geom_line(data = observedotusrare %>% group_by(Sequencing.Depth, SpeciesCode) %>% summarise(Mean = mean(Observed.OTUs, na.rm = TRUE)), aes(x = Sequencing.Depth, y = Mean, color = SpeciesCode, group = SpeciesCode))
Does it answer your question ?
Reproducible example
df <- data.frame(Xvalues = rep(c(10,2000,23500), each = 30), Species = rep(rep(LETTERS[1:3], each = 10),3), Yvalues = c(rnorm(10,1,1), rnorm(10,5,1), rnorm(10,8,1), rnorm(10,5,1), rnorm(10,8,1), rnorm(10,12,1), rnorm(10,20,1), rnorm(10,30,1), rnorm(10,50,1)))
medianormean) with layers likegeom_pointorgeom_path, compared togeom_boxplot.?dput()).