This is a hard-to-answer question, frankly. The loss of Cuba in 1898 was an extremely traumatic moment in Spanish history and, in many ways, unleashed the energies that led to the Civil War. Without the loss of Cuba and Puerto Rico (and the Philippines, but they didn't have the same role in the collective imagination of the Spanish intellectual, social and political elites), it is very hard to know how things could evolve in Metropolitan Spain.
However, I could venture to say that the military and the political elites won't feel the same pressure to get so heavily invested in the Rif as a way to recover the lost prestige. This makes it less likely that a type of
africanista mentality develops in the Army and the stab-in-the-back myth that the Army started to believe in increasingly more in more from 1898 on, and which can be seen as early as 1906 with the
Cu-Cut incident.
As concerns Puerto Rico, the Estatuto de Autonomía was significantly more wide-ranging than the modern ones, far more like that of a French TOM or Greenland vis-à-vis Denmark nowadays. Puerto Rico would have retained representation in Parliament but would have been very autonomous, including on customs issues (which makes sense, given the importance of trade with the US).
Besides that, by 1898, Puerto Rico's Partido Liberal Autonomista, seemed on the verge of being a hegemonic party, due to the collapse of the unity of the Unconditional Party due to internal fractures and the weakness of republicans. This was helped because it had fully taken root in the turnismo back in Metropolitan Spain.
PS: As an aside, it's quite wrong to assume that the Spanish Civil War has to happen and it's a fixed point in history or something.