"I also think that for example, Texas or California have a right to seperate from the Union if the populace wants it"
I do not think that a state has the right to secede from the United States. Accession is a one-way street, unless the Union itself agrees to the secession. We fought a war about that, remember? You can't unilaterally "opt out" of the United States.
"What if you don't want the USA to be a republic? What if you want California to be a separate state? You have a democratic right to want these things and to peacefully work toward this, but the Pledge seems to undermine it, as if you renounce these democratic rights before the deity"
You can think anything you want, of course, in that sense you are free to think what you want. And you can peacably agitate for what you want too ... at some point, there is a line that cannot be crossed, and the existing government has a right to protect its own existence and constitutional form, other than changes within the constitutional amendment process itself. So, in other words, if you were to obtain a constitional amendment that changed the form of the US federal government, getting rid of the "republican form of government" clause (yes, the states are restricted in that way, they have to have a republican form of government), that is fine. Agitating for changes to the form of government outside the constitutional process however, is more dicey and at some point beyond mere agitation, if agitation becomes closer to action, you start to get closer to the criminal statutes.
I don't see the pledge as a big deal one way or the other, personally, but I respect other views on that.