It doesn't look like you are creating a pdf formatted file (you're just making a file with the extension pdf). You need to use a library like itext to create the pdf file and then write it to cloudstorage.
e.g using itext to write to outputstream src:
Document document = new Document();
PdfWriter.getInstance(document, response.getOutputStream());
document.open();
document.add(new Paragraph("This is a paragraph"));
document.close();
You'd need to modify the above code to write to gcs (instead of response outputstream).