Just bought a new bike and got another wheelset in the deal. One is 700c and one is 650b. Right now they both have 11-34 cassettes. The rear derailleur is Shimano Claris long cage. I found an 11-23 cassette online. I'm curious as to whether or not the length of chain would be a problem when switching between wheelsets with this big of gap between the large cogs. Anyone have a similar experience?
It will "work" although shifting will likely be compromised, which could include slow or even ineffective shifts on the upper half of the cassette when running the 11-23 cassette.
Rear derailleurs are designed to move in an arc that follows the cassette profile. As such different derailleurs are designed to work with different ranges of cog sizes. If you go to Shimano's technical documents the Claris RD-R2000-GS derailleur ("long" cage) has a specified min and max low gear range of 28 to 34, while the "short cage" version (RD-R2000-SS) has specified min/max low gear 25 to 32. Neither were designed to work explicitly with a 11-23 cassette, although 25 is very close to 23 so in this case the "short cage" version would probably work just fine.
The problem in your case is that once the long cage derailleur is set up to work with an 11-34 cassette, swapping in a 11-23 cassette will effectively move the derailleur away from the cogs in the upper half of the cassette resulting in poor and potentially missed shifts. As you move from a cassette with larger range (i.e., 11-34) to a cassette a smaller range(i.e., 11-23) the distance from the cog to the top derailleur jockey wheel will have increase greatly for the upper half of the cassette. If you have set up a modern derailleur according to the supplied documentation this distance is often quoted as being critical to precise shifting as the top jockey wheel drives the derailing of the chain. Once the distance becomes excessive the derailleur loses the ability to quickly and precisely change gears until its kinematics brings it in closer to the cogs in the bottom half of the cassette. If you were running friction shift, this wouldn't be an issue as you could simply move the derailleur further to initiate a shift, but if you are running indexed shifting, you will likely find that shifting will have deteriorated for the upper half of the cassette.