Two custom post types divided in two columns inside a bootstrap carousel

You could try something like this.

The idea is to check within the loop if the item is even or odd, and for the odd item you open the two-item-slide (display the opening HTML), where for the even you close it.

I haven’t tested it but the idea is like this:

<article class="container">
    <div class="row">
        <div class="carousel-inner">
            <?php 
                $cnt = 1;
                while( $the_query->have_posts() ) : $the_query->the_post(); ?>

                <!-- code for the first item in slide -->
                <?PHP if ($cnt % 2): ?>
                <div class="item<?php if ($cnt == 1) { echo ' active'; } ?>">
                <?PHP endif; ?>

                    <div class="col-md-6">
                        <?php  
                            $imagem_personalizada = get_field('capa_da_pagina_do_case');
                            $thumb_capa = wp_get_attachment_image_src($imagem_personalizada, 'capaIdeia');
                        ?>
                        <a href="https://wordpress.stackexchange.com/questions/266632/<?php the_permalink();  ?>" style="text-decoration: none;">
                            <br>

                            <!-- code for the first item in slide -->
                            <?PHP if ($cnt % 2): ?>
                            <div id="secao-titulo-ideia-single" class="nopadding">
                            <!-- code for the second item in slide -->
                            <?PHP else: ?>
                            <div class="nopadding">
                            <?PHP endif; ?>

                                <img  class="img-responsive center-block" src="<?php echo $thumb_capa[0]; ?>" alt="Thumb Post" width="100%">

                                <!-- code for the first item in slide -->
                                <?PHP if ($cnt % 2): ?>
                                <h2 class="brandonregular titulo-ideia-single text-center"> <?php  the_field('titulo_do_case'); ?> </h2>
                                <!-- code for the second item in slide -->
                                <?PHP else: ?>
                                <h2 class="brandonregular"> <?php  the_field('titulo_do_case'); ?> </h2>
                                <?PHP endif; ?>
                            </div>
                        </a>
                </div>
                <!-- code for the second item in slide -->
                <?PHP if (!($cnt % 2)): ?>
                </div>
                <?PHP endif; ?>

            <?php $cnt++; ?>
            <?php endwhile; ?>

            <!-- code for closing the slide if only one item in the last slide -->
            <?PHP if (!($cnt % 2)): ?>
            </div>
            <?PHP endif; ?>
        </div>
    </div>
</article>